Last active
January 9, 2019 12:44
-
-
Save kas-cor/d00fd152bdf4f705979338129ca84253 to your computer and use it in GitHub Desktop.
My bash alias
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
| alias home='cd /c/OSPanel/domains/' | |
| alias ls='ls -alh --color=auto' | |
| alias g-pull='git pull origin master' | |
| alias g-push='git push origin master' | |
| # Code review | |
| g-review() { | |
| if [ "$1" = "" ]; then | |
| echo Ex. review issues1234 | |
| else | |
| if git checkout master ; then | |
| if git fetch origin $1 ; then | |
| git checkout -b $1 origin/$1 | |
| fi | |
| fi | |
| fi | |
| } | |
| g-merge() { | |
| if [ "$1" = "" ]; then | |
| echo Ex. merge issues1234 | |
| else | |
| if git checkout master ; then | |
| if git merge --no-ff $1 ; then | |
| read -p "Delete local branch $1 (y/n) ?" -n 1 -r | |
| echo | |
| if [[ $REPLY =~ ^[Yy]$ ]] ; then | |
| git branch -d $1 | |
| fi | |
| read -p "Delete remote branch $1 (y/n) ?" -n 1 -r | |
| echo | |
| if [[ $REPLY =~ ^[Yy]$ ]] ; then | |
| git push origin :$1 | |
| fi | |
| fi | |
| fi | |
| fi | |
| } |
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
| if [ -f ~/.bash_aliases ]; then | |
| . ~/.bash_aliases | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using
Pull
g-pullPush
g-pushCode review
g-review banch_nameMerge branch
g-merge branch_nameList files whit system files, hidden files and colories
lsAnd only for me, go home
home