Skip to content

Instantly share code, notes, and snippets.

@crittelmeyer
Last active May 13, 2016 15:59
Show Gist options
  • Save crittelmeyer/140288b14a182706252b to your computer and use it in GitHub Desktop.
Save crittelmeyer/140288b14a182706252b to your computer and use it in GitHub Desktop.
git cheatsheet

Git Cheatsheet

As configured in my dotfiles

Shortcuts

  • g = git

  • gst = git status

  • ga = git add

  • gb = git branch

  • gcb = git checkout -b

  • gcm = git checkout master

  • gd = git diff

  • gcp = git cherry-pick

  • gl = git pull

  • gp = git push

  • grbi = git rebase -i

  • gsta = git stash

  • gstp = git stash pop

  • gstd = git stash drop

  • gstl = git stash list

  • current_branch ==> returns name of current branch

  • current_repository ==> returns names of current remotes

To ignore local changes to a tracked file:

$ git update-index --skip-worktree FILENAME
$ git update-index --no-skip-worktree FILENAME

TODO: Move contents of git_notes.txt to here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment