Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
a very powershell-y way of getting the most unused git branches. makes an object with properties and sorts it.
git branch -r --merged develop | %{$_.trim()} | select @{n='Branch';e={$_}},@{n='LastCommit';e={[datetime](git log $_ -1 --pretty=format:%ci)}} | sort LastCommit
@tenpn

This comment has been minimized.

Copy link
Owner Author

tenpn commented Oct 9, 2012

Output:
Branch DaysSinceLastCommit


origin/speed 34.0214529453032
origin/camera 32.7949343802523
origin/trackgen 26.8374606768634
origin/setpiececamera 21.5704338595984
origin/gestures 21.5041944382025

@tenpn

This comment has been minimized.

Copy link
Owner Author

tenpn commented Oct 12, 2012

Now with datetimes!

Branch LastCommit


origin/speed 05/09/2012 09:58:40
origin/camera 06/09/2012 15:24:51
origin/trackgen 12/09/2012 14:23:37
origin/setpiececamera 17/09/2012 20:48:08
origin/gestures 17/09/2012 22:23:31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.