I have been working with Git for solution control on and off for about five years. I recently decided it was time to stop relying on applications to do my work and that it was time to learn to use Git Command line. The following are all of the commands I have learned so far.
I recommend forking this project on GitHub and using it to test with octocat/Spoon-Knife you can see how to do that here Fork A Repo
[wp_ad_camp_3]
Branches
List all the local branches the one wit the star is the current checked out branch.
git branch
List all the remote branches
git branch -r
Create a new branch with the name of BranchOne
git branch -b BranchOne
Delete local branch
git branch -D BranchOne
Delete remote branch
Git push origin --delete BranchOne
Fetch
Fetches all remote branches
Git fetch –all
Pull
To update all local branches that track remote
Git pull --all
Merge
Merging two branches is something that we need to do alot
Check out the first branch
Git checkout BranchOne
Merge the code from the second branch into the first branch
Git merge BranchTwo
Shows what files have been changed by the merge.
Git status