Skip to content

Instantly share code, notes, and snippets.

@amagee
Last active March 3, 2017 03:10
Show Gist options
  • Save amagee/319eec0f6c3e529d33a3cf7d1400e34d to your computer and use it in GitHub Desktop.
Save amagee/319eec0f6c3e529d33a3cf7d1400e34d to your computer and use it in GitHub Desktop.
Git stuff
# Find commit that deleted a line, given some content in the line
$ git log -S<content>
# Show file at a particular revision
$ git show <revision>:<file_path>
# Abort a merge
$ git merge --abort
# Get commits in one branch that aren't in another branch
$ git log <commits_not_in_branch>..<commits_in_branch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment