Last active
November 15, 2021 13:07
-
-
Save fgdaniel/1ec6cfe0169f557598a09a7fc20bdaed to your computer and use it in GitHub Desktop.
bash aliases commands
This file contains 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 Command Aliases | |
# ---------------------- | |
# Arg1 = target branch | |
function add_branch() { | |
git checkout -b $1 && git push -u origin $1 | |
} | |
alias add_branch=add_branch | |
# Arg1 = target branch | |
function remove_branch() { | |
git checkout master && git branch -d $1 && git push -d origin $1 | |
} | |
alias remove_branch=remove_branch | |
# Arg1 = target branch | |
function checkout() { | |
git checkout $1 | |
} | |
alias checkout=checkout | |
# Arg1 = target branch | |
function merge() { | |
git checkout master && git merge --no-ff $1 && git push origin $1 && git branch -d $1 && git push -d origin $1 | |
} | |
alias merge=merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment