29
How to set up `git bro` command with git alias
Have you seen people use the git bro
command in terminal and always wondered how they do it?
It's actually very easy and I'm going to teach you now. Moreover, after mastering this technique you'll be able to use any command your imagination comes up with, like git cmon
or git brunch
.
I'll also share my own commands config in the end (quite conservative tbh).
First of all, you need git. I assume you already have it, if not, check this out.
All you need to add a command is to define an alias, like this
git config --global alias.bro `branch`
To see all the aliases run
git config --list
To remove one run
git config --global --unset alias.bro
As I promised, in the end I share my setup
alias.co=checkout
alias.cm=commit
alias.st=status
alias.bro=branch
alias.br=checkout -b
alias.pushit=push -u origin HEAD
That's it, now you can update your CV stating that you are bros with git
!
👋
29