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).
You have git set up
First of all, you need git. I assume you already have it, if not, check this out.
Add the command
All you need to add a command is to define an alias, like this
git config --global alias.bro `branch`
Manage the aliases
To see all the aliases run
git config --list
To remove one run
git config --global --unset alias.bro
My aliases
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
Thanks for tuning in
That's it, now you can update your CV stating that you are bros with git
!
👋
Top comments (0)