4 ms·
I alias 'git recent' to: git branch --sort=-committerdate -v It gives me the following output (first line for not actually included): [branch name]
by petepete 7y ago
I alias 'git recent' to:
git branch --sort=-committerdate -v
It gives me the following output (first line for not actually included):
[branch name] [hash] [commit message header]
move-radio-and-checkbox-hints-up 9dff690 Move the hints belonging to radios/checkboxes up
update-rubocop 8cace1f Update rubocop and pry, fix some new offences
fix-remaining-injected-content-placement 48dc51d Reorder elements of other inputs
- montroser 7y agoYes, my "see what the team is up to" git command is: git branch -a --sort=-committerdate That's short enough for my taste not to have to alias, and it gives output more or less similar to GitHub's "Active branches" view.
- jkubicek 7y agoI do the same thing for this slightly longer alias git for-each-ref --sort=-committerdate --format='%(committerdate:short): %(refname:short)' refs/heads/ Including the dates is crucial; I'll frequently go in and clean up personal branches that are older than X months.
- sixstringtheory 7y agoI've got one really close to this: git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short) %(committerdate:short) %(upstream:remoteref)' | column -t
- alkonaut 7y agoThis is much better as it’s portable and doesn’t cheat by assuming awk/grep/etc are available.
- mandelbrotwurst 7y agoHonest question, what kind of environments are you working in where you don't / can't have these?
- alkonaut 7y agoWindows (cmd/powershell). It wouldn’t surprise me if windows cmd is the most common environment for git on command line, since windows is the most common OS among developers (and git-bash is terrible).