Skip to content

Instantly share code, notes, and snippets.

@robertg042
Last active May 24, 2018 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertg042/5ae2fc8b91e3835013895c6ce1fb991f to your computer and use it in GitHub Desktop.
Save robertg042/5ae2fc8b91e3835013895c6ce1fb991f to your computer and use it in GitHub Desktop.
Git cheatsheet
# checkout tracked remote branch
git remote show origin # lists remote config (including tracked branches)
git checkout -t <remote>/<tracked_branch> # creates new local branch named <tracked_branch> and sets upstream
# move unfinished work between workstations
git stash
git stash show -p > myPatchFile
## apply
git apply myPatchFile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment