Prompt to push tags attached to HEAD when pushing to remote.
This commit is contained in:
parent
1663722561
commit
4b7cc24843
1 changed files with 10 additions and 0 deletions
10
bin/g
10
bin/g
|
|
@ -367,6 +367,16 @@ else
|
||||||
echo "I will run git push --set-upstream ${remote} ${remote_branch}"
|
echo "I will run git push --set-upstream ${remote} ${remote_branch}"
|
||||||
git push --set-upstream ${remote} ${remote_branch}
|
git push --set-upstream ${remote} ${remote_branch}
|
||||||
fi
|
fi
|
||||||
|
tags="$(git tag --points-at HEAD | tr '\n' ' ')"
|
||||||
|
if [ ! -z "$tags" ] && confirm "Would you like to push these tags (${tags}) to the remote as well?"; then
|
||||||
|
local_branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
|
remote=$(git config --get branch.$local_branch.remote)
|
||||||
|
echo ''
|
||||||
|
git push ${remote} ${tags}
|
||||||
|
else
|
||||||
|
echo ''
|
||||||
|
echo 'OK, just thought I'"'"'d ask.'
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
remote)
|
remote)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue