| cd /c/dev/projects | change directory to c:\dev\projects |
| git status | get the status of current directory |
| git add . | stage all pending adds/updates |
| git add -u | stage all pending updates/deletes |
| git commit –m "my message" | commit the changes with a message |
| git push origin master | push the committed changes to github |
| git branch myBranch | create a new branch named “myBranch” |
| git branch | list all existing branches |
| git checkout myBranch | switch to the “myBranch” branch |
| git checkout master | switch to the “master” branch |
| git merge myBranch | merge “myBranch” into the current branch |
Thursday, January 6, 2011
My Git Cheat Sheet
Here’s a nice little cheat sheet of the most common commands I’ve been using in Git, to push my changes out to Github:
Subscribe to:
Post Comments (Atom)
1 comment:
I can't believe you're my brother... You know a foreign language, and I didn't even know it! ;-)
Post a Comment