Git and Git-hub, a very vital tool in a developers life
Hello Guys
Honestly, becoming a web dev is a journey that requires the mental ability and physical ability too. It needs patience and dedication.
Git and Github is a very vital tool that every developer got to know in this ecosystem, but i have been finding it very difficult to understand the concept in these two.
So many developers confuse git with github, now let me make it easy for then with these illustrations and few explanations.
The first question is: What is Git?, and what is Github?
**A Git **
GIT is a version control system for tracking chanfes in computer files. It is generally used for source code management in software development. I dont know if u got the perfect understanding of what git is..(any question should be directed to the comment section).
Features of Git:
- A GIT tracks history
- A Git is totally free and open source
- Support Non-Linear Development
- Create Breakup
5.Scalable - Supports Collaboration
7.Branching is easier - Distributed Development.
While
A Git-hub is just a website where our repositories (files) are stored and kept for easy access.
I will show you how to push a file to git hub through git
There are so many commands for in git but i will show you the ones to use when pushing a repo.
- Git is a version control system
- Github a website
- Git is used to put work or project into git hub
Using git:
- download and open git bash in your PC
- go into desktop by typing ' cd Desktop '.
- create folder called anything . I.e mkdir anything
- go into the repo (folder) ime cd anything
- initialize git in the folder i.e git init
-go off from git and locate this repo in your desktop, open it and add a file if it doesnt have any.
-go back to git and check it the file is addede i.e git status - you will dee the file and then add it to git. I.e git add ' name of file '.
- the commit the file i.e git commit -m ' the comment '.
- add a user name and email after commiting i.e git config --global user.name and git config --global user.email.
After doing this, go back to your github, cteate the repo and copy the repo link
Come back to the git, and specify where you want the files of the repo in git to go to.
I.e git remote add origin, then paste the git repo link
Then u push.. i.e git push Origin master..
Is a bit confusing but i urge u to read more so you get the perfect understanding.