This is not a script. You will want to just add these functions to your bash config (or make it into a script, do what you want, I'm not your mom)
You can remove all the other functions if you want to just replace ohai
and error
with echo
for simplicity (I just have those formatting functions at the top of my alias/function file in my bash config and use them in a lot of my functions. They are originally from the homebrew sourcecode)
- exit if not in git repo
- support a main branch other than
master
(useful if you are using main
or if you use something like gitflow and want to compare to develop
, staging
, etc