bash/.bashrc.d/90-aliases.bash (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
ggp() {
[[ "$1" == "-f" ]] && {
git push "$(git remote show)" -f "$(git branch --show-current)"
}
git push "$(git remote show)" "$(git branch --show-current)"
}
gpl() {
git pull -r "$(git remote show)" "$(git branch --show-current)"
}
gpm() {
git pull -r origin master
}
gco() {
[[ "$1" == "" ]] && return 1
git rev-parse --verify "$1" &> /dev/null
if [ $? -eq 0 ]; then
git checkout "$1"
else
git checkout -b "$1"
fi
}
|