Skip to content

Instantly share code, notes, and snippets.

@otaviolarrosa
Created August 22, 2018 13:27
Show Gist options
  • Save otaviolarrosa/55fad971bcc27fddefd12e1de1184f9d to your computer and use it in GitHub Desktop.
Save otaviolarrosa/55fad971bcc27fddefd12e1de1184f9d to your computer and use it in GitHub Desktop.
My Personal Git files - .bash_profile
alias difftool='git difftool'
alias mergetool='git mergetool'
alias cob='git checkout -b'
alias p='git pull'
alias co='git checkout'
alias st='git status -s'
alias cmm='git commit -m'
alias a='git add .'
alias cpe='git cherry-pick -e'
alias cpn='git cherry-pick -n'
alias master='git checkout master'
alias diff='git diff'
alias develop='git checkout develop'
alias master='git checkout master'
alias b='git branch'
alias ~='cd ~'
function cmmpush(){
git add .
git commit -a -m "$1"
git push origin `git rev-parse --abbrev-ref HEAD`
}
function cmmpushforce(){
git add .
git commit -a -m "$1"
git push origin `git rev-parse --abbrev-ref HEAD` -f
}
function pr(){
git pull origin `git rev-parse --abbrev-ref HEAD`
}
function po(){
git push origin `git rev-parse --abbrev-ref HEAD`
}
function pof(){
git push origin `git rev-parse --abbrev-ref HEAD` -f
}
function cmm(){
git add .
git commit -a -m "$1"
}
function log(){
git log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
}
function loggraphh(){
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
}
function deletebranch(){
git branch -D "$1"
}
function rebase(){
git rebase "$1"
}
function stash(){
git stash push -m "$1"
}
function stashlist(){
git stash list
}
@otaviolarrosa
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment