Last active
June 6, 2017 18:00
-
-
Save soundyogi/e3449b71282d4b14206b to your computer and use it in GitHub Desktop.
Git Cheat Sheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// git cheatsheet for newbies | |
// init a new repo | |
git init | |
// add a "remote" with a name and repo url | |
git remote add "remoteName" "url" | |
// add all changes | |
git add -A | |
// commit changes to staging | |
git commit -m "comment" | |
// push changes to repo | |
git push "remoteName" "branch" | |
// pull changes | |
git pull "remoteName" "branch" | |
// show all branches | |
git branch -a | |
// show only remote branches | |
git branch -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment