6 if [ $stat -ne 0 ] ; then
11 echo checking
for local changes
:
12 cmt
=$
(git
diff --name-only |
wc -l )
13 if [ $cmt -ne 0 ] ; then
14 git
diff --name-status |
cat
16 echo 'local changes detected, run git commit first'
19 cbr
=$
(git branch |
grep \
* |
sed 's|\*||')
22 branch
=$
( (git branch |
sed 's|\*| |' ; git branch
-r |
sed 's|origin/||' ) |
sort |
uniq -d )
25 echo merging origin
/$i to
$i:
29 if [ $stat -ne 0 ] ; then
39 if [ $j -ne 0 ] ; then
40 echo 'automatic merging of the following branches failed due to conflicts:'
43 echo 'all local branches merged successfully'