all repos — dotfiles @ 37ec77a37800354dbf07d259cf2ccac9152ce647

my *nix dotfiles

bash/.bashrc.d/90-aliases.bash (view raw)

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