I understand what you are asking, but I'm not sure what solution you think. If your file path is potentially βshortened,β why don't you change the folder names directly?
I am not an expert, but I suspect that for use on the command line you will not find much better than what you already have.
Using a GUI with a folder browser might be what you want? (for windows , for linux )
(If you perform many operations on multiple files in the same subfolder, you can go to this folder and run your commands from there - although you can check if specific git commands can really handle this)
EDIT If there is only one or more folders that you always need to reference, you can configure the shell variable, as bstpierre suggests in your comment on your question.
Benjol
source share