Created
August 9, 2021 23:55
-
-
Save alana314/d60d804b2c4ccb43f207b8887a6ac8a0 to your computer and use it in GitHub Desktop.
git show recent branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#show recent branches. You could make this file as /usr/local/bin/gitshowbranches, chmod it to execute it, and then run "gitshowbranches" to show recent branches | |
#based on https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit | |
git branch --sort=-committerdate | head |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment