Why use shell aliases for something that's git specific? You can just use git aliases.
Instead of:
alias git-branch="git branch | sed -n -e 's/^\*\(.*\)/\1/p'"
Do:
git config --global alias.this-branch '!'"git branch | sed -n 's/^\*\(.*\)/\1/p'"
Now, from within any repo, you can run git this-branch, and you didn't have to add anything to your shell, and if you switch shells, it will continue to work.
Why use shell aliases for something that's
git
specific? You can just usegit
aliases.Instead of:
Do:
Now, from within any repo, you can run
git this-branch
, and you didn't have to add anything to your shell, and if you switch shells, it will continue to work.That's pretty cool! I basically just learned about that from people on this post