git specific aliases are generally better done as git aliases, rather than shell aliases. This way, they only apply when working with git, they don't need to be added to your shell rc, and also, if you decide to switch shells, they'll still work.
git
E.g., instead of
alias gbda='git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
Do:
git config --global alias.bda '!git branch --no-color --merged | command grep -vE "^(\+|\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d'
Now, instead of gbda, you run git bda.
gbda
git bda
There is a couple of typos. Your last sentence should be: "Now, instead of gbda, you run git bda"
Thanks! I've corrected it.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
git
specific aliases are generally better done asgit
aliases, rather than shell aliases. This way, they only apply when working withgit
, they don't need to be added to your shell rc, and also, if you decide to switch shells, they'll still work.E.g., instead of
Do:
Now, instead of
gbda
, you rungit bda
.There is a couple of typos.
Your last sentence should be:
"Now, instead of gbda, you run git bda"
Thanks! I've corrected it.