Skip to content

Instantly share code, notes, and snippets.

@alassiter
Last active September 17, 2018 13:52
Show Gist options
  • Save alassiter/3066ab9e67621ed36409eeefdcc582a8 to your computer and use it in GitHub Desktop.
Save alassiter/3066ab9e67621ed36409eeefdcc582a8 to your computer and use it in GitHub Desktop.
Useful git commands
# To see only the commits that were CREATED on a given branch
git log --decorate --pretty=oneline --abbrev-commit --no-merges --first-parent master..target_branch
# Git branch listed by date
git branch --sort=-creatordate \
--format "%(creatordate:relative);%(committername);%(refname:lstrip=-1)" \
| grep -v ";HEAD$" \
| column -s ";" -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment