I've implemented a Git command and used git aliases to hook it into Git but is there a way to hook the Git help? I'm running on Windows and if I issue git help mycmd
I get a popup telling me that Git can't find a git-mycmnd.html file.
I've implemented my command using Python so is there a proper Git-ish way to add the help in, other than 'just knowing' where help files have to be placed?
You can have customised documentation for for your aliases, and the documentation can be either locally saved or online accessible over the web. Here's how it works:
git config --local help.format html
cd ~/Documents
git clone git://git.kernel.org/pub/scm/git/git-htmldocs.git git-doc
Assuming your command is love
so:
cd ~/Documents/git-doc
touch gitlove.html
Add some text to the gitlove.html
cd YOUR_PROJECT_REPO
git config --local help.htmlpath ~/Documents/git-doc
Now you can do: git help love
and your html page will pop up.
Enjoy!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With