added taglist alias and tagpush functions
This commit is contained in:
parent
0eb28cf6cc
commit
bea9c85c9a
@ -1,4 +1,5 @@
|
|||||||
alias pubkey='for PUBKEY_FILE in $(ls ~/.ssh/id_*.pub); do echo "${PUBKEY_FILE} :" | sed -e "s/.*id_//;s/\.pub//"; cat "${PUBKEY_FILE}"; echo; done'
|
alias pubkey='for PUBKEY_FILE in $(ls ~/.ssh/id_*.pub); do echo "${PUBKEY_FILE} :" | sed -e "s/.*id_//;s/\.pub//"; cat "${PUBKEY_FILE}"; echo; done'
|
||||||
|
alias taglist='git tag | tr - \~ | sort -V | tr \~ -'
|
||||||
alias hosts='sudo nano /etc/hosts'
|
alias hosts='sudo nano /etc/hosts'
|
||||||
alias historygrep='history | grep'
|
alias historygrep='history | grep'
|
||||||
alias sshconfig='nano ~/.ssh/config'
|
alias sshconfig='nano ~/.ssh/config'
|
||||||
|
@ -21,3 +21,16 @@ __git_prompt() {
|
|||||||
__git_history() {
|
__git_history() {
|
||||||
echo "$(git log --oneline | cut -d ' ' -f 1)"
|
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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user