added taglist alias and tagpush functions

This commit is contained in:
bryanpedini committed 2024-03-24 10:00:30 +01:00
1 parent 0eb28cf6cc
commit bea9c85c9a
2 files changed
+14

No files matched your search

+13
View File
@@ -21,3 +21,16 @@ __git_prompt() {
__git_history() {
echo "$(git log --oneline | cut -d ' ' -f 1)"
}
tagpush() {
if [ -z "$1" ]; then
echo "Usage: tagpush <tag>"
return
fi
git tag "$1"
# for every remote
for REMOTE in $(git remote) ; do
# push current branch and newly created tag
git push "$REMOTE" $(git branch | grep "*" | sed 's/\* //') "$1"
done
}