Created
April 24, 2017 11:30
-
-
Save belukov/b0999b6620647bfd1d41c2d3a71314e8 to your computer and use it in GitHub Desktop.
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
| gs=`git status 2>&1`; | |
| #echo "gs: '$gs'"; | |
| echo ""; | |
| if [[ $gs =~ 'Not a git repository' ]]; then | |
| echo "No git"; | |
| pwd | |
| exit 1; | |
| fi | |
| if [[ $gs != *'On branch master'* ]]; then | |
| echo "WARNING: you not in master! Status:"; | |
| echo $gs; | |
| echo ""; | |
| fi; | |
| git branch -v | grep '^ ' | while read b_row; do | |
| branch=`echo $b_row | cut -d ' ' -f 1`; | |
| commit=`echo $b_row | cut -d ' ' -f 2`; | |
| #echo "row: $branch $commit"; | |
| search=`git log | grep $commit`; | |
| if [ -z "$search" ]; then | |
| echo "$branch $commit"; | |
| #else | |
| #echo "in master"; | |
| #echo "'$search'"; | |
| fi | |
| #echo ""; | |
| #echo ""; | |
| done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment