Last active
May 17, 2021 10:04
-
-
Save ackinc/a3f7f4644255e8a87edd743b01e35a54 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment