-
Notifications
You must be signed in to change notification settings - Fork 23
Developer guide: james git crib sheet
James Ong edited this page Nov 25, 2013
·
1 revision
| git fetch | get changes from all remote archives |
| git fetch REMOTE | get changes from the REMOTE remote archive |
| git merge REMOTE/BRANCH | merges REMOTE/BRANCH into current branch |
| git push REMOTE BRANCH | push local to REMOTE, branch BRANCH |
| git remote add jl8e https://github.com/jl8e/buttonmen.git | add remote jl8e |
| git branch | show all local branches |
| git branch -a | show all local and remote branches |
| git branch BRANCH | create new local branch BRANCH |
| git checkout BRANCH | change active branch to BRANCH |
| git branch -d BRANCH | delete local branch BRANCH |
| git push origin :BRANCH | delete remote branch BRANCH |
| git log | get log |
| git reset --hard VERSION_ID | revert a branch to version VERSION_ID |
| git reset --hard HEAD~1 | delete the most recent commit and revert |
| git remote prune origin | remove local branches that have been removed from remote |
| git stash | stash changes |
| git stash apply | apply stashed changes |