Hacker News new | ask | show | jobs
by rushi_agrawal 4358 days ago
As someone who use git quite a lot, I have created a TON of aliases for it, so that I have to type very less. Sometimes, I have created bash functions as it needs to handle some logic too.

For example: gl (git log), gb (git branch), gr (git remote -v), gpom (git push origin master), gpuom (git pull origin master), gcam (git commit -a -m), gcaa (git commit --amend -a), gc <github-ID>/<repository> (git checkout -b https://github.com/$1), etc

2 comments

This is exactly what I did when we started our current project at work, on which we use Git. I also made aliases gl, gr, gb. gc means 'git commit -m' for me, and I have gco for 'git checkout', gcb for 'git checkout -b', gpod for 'git push origin develop' and gpud for 'git push upstream develop'. Made my life so much easier. :)
I've very recently started adding all of it to a github repo. Very early version, but can be found at https://github.com/rushiagr/myutils/blob/master/aliasrc