As stated in numerous posts like this you could extend git by placing a program/script in your PATH. I get it working if I place my script in for example /usr/local/bin/
. But I what to add commands without being root
, but if if put it in ~/bin/
it will not be found.
~/bin/
is in my PATH since its added in my .bashrc
like this:
export PATH="${PATH}:~/bin"
I got other stuff as well in my ~/bin/
that I use regularly so the PATH-thing is working for other things!
Is there something I'm missing or doing wrong here?
The only missing piece would be the naming convention:
git my-custom-made-extension ... → git-my-custom-made-extension
That means you need to have an executable file ~/bin/git-my-custom-made-extension
(no extension, chmod 755)
Plus, don't rely on ~
: the git shell which will execute the script might not have the same ~
as the user who owns the script. PATH should include the full path of the home.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加