Git Shortcuts

Git Alias

Simply ‘git checkout’ to ‘git co’

git config --global checkout

This one is an evolving personal preference.  Whether to have ‘git st’ be ‘git status’ or ‘git status -uno’. I figured I’d leave ‘git status’ to show all files whether they already in the project or not’. ‘git status -uno’ only shows the status of files that already exist in the project.

git config --global 'status -uno'

For git repo cloned via https, I hate typing in the password all the time. Luckily git can store the credentials.

git config credential.helper store

Checkout and branch

git co -b NEWBRANCH

Compare two branches

git diff master..staging
# Show only files that are different
git diff --name-status master..staging