Skip to content

Instantly share code, notes, and snippets.

@hannesvdvreken
Last active August 31, 2015 07:28
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 hannesvdvreken/4aeb00405b7c36dbb08e to your computer and use it in GitHub Desktop.
Save hannesvdvreken/4aeb00405b7c36dbb08e to your computer and use it in GitHub Desktop.
# Show graph of commits with abbreviated hashes and commit messages
git log --oneline --decorate --all --graph
# Show entire repo's changes one at a time to decide which to stage and which not.
git add -p
# Record conflict resolving. https://git-scm.com/blog/2010/03/08/rerere.html
git config --global rerere.enabled true
# Merge, but always add an extra merge commit instead of just moving the branch reference.
git merge --no-ff
# Check the diffs of what has already been staged instead of unstaged changes.
git diff --staged
# Check all diffs, even what has already been staged.
git diff HEAD
# Search a commit which introduced a mistake in an automated fashion
git bisect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment