git branch -r
git branch -a
git fetch
git checkout <branch>
git fetch
git checkout -b <branch> <origin>/<branch>
git checkout <current branch>
git checkout <branch to retrieve from> -- filename.txt
git commit -m "Update from <branch to retrieve from>"
git add -u
Source: https://ncona.com/2011/07/how-to-delete-a-commit-in-git-local-and-remote/
git push --delete <remote> <branch>
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
git reset --hard
git checkout .
git clean -n
This removes untracked files, including directories (-d) and files ignored by git (-x).
git clean -d -x -f
git push --all origin
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
git diff --name-status master
git clean -xdf && git reset --hard