Understanding Git Part 2 (Git Commands)

Extra information about Git, that may help you in your daily life.

List Of Git Commands:

Command Description
git branch nameOfBranch creates another branch
git checkout nameOfBranch switches to the other branch
git branch returns the current branch you are in
git checkout master switches to master branch
git merge nameOfBranch merges the changes from a branch to master
git branch -d nameOfBranch delete the branch
git push pushes all the changes to github
git --help help page
git help config help about config command
git config --global "Name" configure git, it adds your name and email to the config file
git show HEAD to see the most recent commit
git remote update Brings remote ref up to date
git status -uno Tells you if the branch you are tracking is ahead, behind or has diverged
git diff It shows the difference between the index(staging area) and the working directory after you edit
git rebase Rewinds the commits on your current branch, pulls in the commits from the other branch, and reapplies the rewinded commits back on top.git rebase

Extra Information:


I hope you enjoyed reading this git tutorial, please feel free to leave any comments or feedback on this post!

Deploy your next app in seconds. Get $100 in cloud credits from @DigitalOcean using my link:

Subscribe for Latest Tutorials!