# git shortcuts alias gits='git status' alias gitb='git branch' alias glog='git log --graph --oneline --decorate' alias gco='git checkout' alias gcd='git checkout dev' alias gcdev='git checkout dev' alias gcs='git checkout staging' alias gcm='git checkout master' alias gcmn='git checkout main' alias gcmain='git checkout main' alias gca='git commit --amend' alias gitp='git push' alias gitpt='git push --tags' alias gitpf='git push --force' # push current branch to remote, setting up a tracking branch with the same name # if remote is not specified, 'origin' is assumed gitpu() { if [ -n "$1" ]; then remote="$1"; else remote='origin'; fi git push --set-upstream "$remote" `git branch | grep \* | cut -d" " -f2` }