- git branch xxx new branch XXX
- Git branch-a View all branches (including remote)
- Git branch--set-upstream-to remotes/origin/xxx the current branch to the remote branch XXX
- git checkout-b xxx remotes/origin/xxx maps remote branch xxx to local branch xxx (git pull is needed later)
- Discard local modifications, forcing overrides using content from remote libraries
git fetch--allgit Reset--hard origin/master
git fetch simply downloads the contents of the remote library and does not do any of the merge git reset to point the head to the latest version just downloaded.
- Git Stash Staging work
- Git stash pre-staged work before pop recovery
- Git stash save "work on progress for Foo feature" staging (plus tag)
- Git stash list lists all the jobs that have been staged
- git stash apply [email protected]{n} Take out the temporary work with number n
Common git command logging