This file contains hidden or 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
| # | |
| # I needed this for something and was surprised that I couldn't find an easy answer elsewhere. | |
| # So here it is just in case a search engine picks it up. | |
| # | |
| # Given a file path, it lists all remote branches that have modified that path | |
| # | |
| function git_file_branches() { | |
| echo -e "date\tbranch\tauthor" | |
| for BRANCH in $(git log --remotes --no-merges --not develop --source --decorate=short -- $1 | grep ^commit | cut -f 2 | uniq); do | |
| git log -1 --date=format-local:'%Y-%m-%d %H:%M:%S' --pretty=format:"%ad%x09%D%x09%an <%ae>" $BRANCH 2>/dev/null | sort |
OlderNewer