Tutorial, Web

Basic git command to learn

Git allows a team of people to work together, all using the same files. And it helps the team cope with the confusion that tends to happen when multiple people are editing the same files.

There are many ways it can be set up and configured, but at my job, here’s how we use it: when a new employee starts, he downloads all the files from Github, which is an online server we’re all connected to.

To maintain git you must have to learn about some common git command which is very basic but really necessary for your work.

Bellow I am listing Basic git command to learn


git status

To add All Changes Content

git add -A

To commit

git commit -m "Your message"

Upload file online

git push

to pull current repository from online

git pull

To create branch

$ git checkout -b [name_of_your_new_branch]
$ git branch [name_of_your_new_branch]

Checkout or change branches

$ git checkout [name_of_your_branch]

Merge a branch with master

git merge [name_of_your_branch]

For new branch set upstream

git push --set-upstream origin [name_of_your_branch]

For more about git command and branching you can check the following link.

You Might Also Like

Leave a Reply