Hacker News new | ask | show | jobs
by barrkel 4616 days ago
Did you know you can make your own git commands, and I don't mean just aliases?

Write a script called git-mycommand, and you can invoke it with 'git mycommand'. Tab completion works too, at least for bash + bash_completion.

1 comments

Yes, I have written some of those too. Just make sure the script is in your PATH. I drop them in ~/bin/ -- which reminds me of another thing you should have in your ~/.bash_profile, if it isn't already in the template provided by your system:

    if [ -d $HOME/bin ]
    then
        PATH=$PATH:$HOME/bin
    fi