Last active
April 11, 2020 03:14
-
-
Save tomchapin/a037eb08644ae2f4a408b501b3e1643f to your computer and use it in GitHub Desktop.
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 | |
# -------------------------------------------------------------------------- | |
# Git Recent (by Tom Chapin - https://www.github.com/tomchapin) | |
# -------------------------------------------------------------------------- | |
# This command lists your local branches which have recent commits in them. | |
# -------------------------------------------------------------------------- | |
# Installation: | |
# Copy this script as a file named "git-recent" somewhere in | |
# your path (For example: /usr/local/bin/git-recent), and then | |
# run "chmod +x git-m2p" to give it execution permissions. | |
# -------------------------------------------------------------------------- | |
# Usage: | |
# From inside your git repo, type "git recent" | |
# -------------------------------------------------------------------------- | |
set -euo pipefail | |
# git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) - %(refname:short)' | head -n 20 | |
git --no-pager branch --sort=-committerdate -v | head -n 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment