Stephen Lindberg

Product Designer @ Iterable

27 July 2021

git

To switch to a new branch:

git checkout -b new-branch-name

or

git switch -c new-branch-name

Stage all modified files that are already tracked:

git add -u

View diff of staged files only:

git diff --staged

Push to a branch of the same name on your remote (so you don’t have to explicitly set your upstream)

git config --global push.default current