Skip to content

Instantly share code, notes, and snippets.

@gelysis
Last active May 22, 2019 00:00
Show Gist options
  • Save gelysis/ae49cb6a72e25264d45ab842e11b2d2c to your computer and use it in GitHub Desktop.
Save gelysis/ae49cb6a72e25264d45ab842e11b2d2c to your computer and use it in GitHub Desktop.
git for-each-ref --sort='-authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs/heads # local branches only, date descending
git for-each-ref --sort='authordate:iso8601' --format=' %(authordate:relative)%09%(refname:short)' refs # both, remote and local branches, date ascending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment