git clone
git status
git remote -v
git remote add upstream https://github.com/Esri/....
git remote set-url upstream --push no_push
git fetch upstream git branch -va # only if you want to see the remote branches available git checkout master git merge upstream/master
git merge --abort
git add
git diff
git diff master
git diff --cached git diff --staged
git commit
git commit -m
git commit -a -m
git commit --amend
git rm --cached
git log git log origin/master..master (compare local to remote)
git log -p -
git log --pretty= ##For all options look at http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History
#BRANCHING
git branch --show-current
git branch
git branch branchname git branch branchname HEAD~3 (using a symbolic ref)
git checkout
git checkout -b
git branch -a (list) git branch -v git branch -va (with remote tracking branches)
git branch -r (view remote branches) git remote update (if for some reason the remote branches don't refresh/aren't current)
git merge
git branch -d git branch -d hotfix git branch -D hotfix (force delete even if not merged)
git submodule init git submodule update git submodule foreach git pull master
git clean --dry-run git clean -f git clean -f -d (dirs also) git clean -f -X (ignored files also)
git reset --soft HEAD^1 undo last commit, but leave the changes in the working tree git reset --hard origin/master undo (delete) all commits since last time one was pulled from upstream (Watch out !). This should be done while in the master branch: git reset --soft origin/master undo all commits since the last time one was pulled from upstream but leave the changes in the working tree. This should be done while in the master branch:
git stash git stash pop git stash list git stash apply git stash apply stash@{2} (If > 1 stash) git stash drop stash@{0}
fetch the latest changes from upstream in each submodule, merge them in, and check out the latest revision of the submodule
git submodule update --remote --merge
git cherry-pick commit-SHA