# How it works:
# git fetch downloads the latest from remote without trying to merge or rebase anything.
# Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master.
git fetch --all
git reset --hard origin/master
# grab a branch in git
git fetch
git checkout branch
# create your own branch
git checkout -b <name_of_branch>
# or
git branch <name_of_branch>
# merge master into branch
git checkout feature_branch
git merge master
# or if local master is not up to date
git merge origin/master
# list local branches that do not have remote tracking
git branch -vv | grep -v origin