Is there some shortcut for filepath, because it's very annoying write full path again and again?
Some kind regular expression or something else.
I know, I can use "Tab" key, but...
UPDATE:
Windows and default sh.exe from Git
ANSWER:
Git extensions from holygeek are what I looking for, but his version is working only on *NIX like systems or cygwin with newer version of Bash.
That is reason, why I created little fix for msysgit => here
Using Windows Explorer, navigate to any directory you want, type "cmd" in the address bar it will open Windows command prompt in that directory. Along the same lines, if you have the git directory in your path, you can type "git-bash" in the address bar and a Git Shell will open in that directory.
Change Default Directory in Git Bash Right-click on Git Bash's shortcut icon and go to the Properties. In the Start in field, paste the path to the desired folder, e.g. D:\WorkDir.
When I search git bash in the Start Menu and Open File Location of the shortcut, it brings me to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Git . Once we find our shortcut, we can right click the Git Bash shortcut and select Properties .
in the git-bash, try
declare -x YOURVARIABLENAMEHERE=C:/.../.../
cd $YOURVARIABLENAMEHERE
takes me right to the specified directory.
I wrote a tool that allow me to use numbers when dealing with files in git (git-number).
I've been using it on linux (a couple of shell script and a perl script).
If you're feeling adventurous try to make it work on windows.
It's been a big productivity boost for me as I don't rely on tab completion nor do I need to write the long file or directory names anymore when manipulating files in git.
git-number: https://github.com/holygeek/git-number
I understand what you're asking, but I'm not sure what kind of solution you're thinking of. If your filepath is potentially 'shortenable', why don't you change the names of the folders directly?
I'm no expert, but I suspect that for command-line usage, you won't find much better than what you've already got.
Using a GUI with a folder browser might be what you want? (for windows, for linux)
(If you're doing a lot of operations on multiple files in the same subfolder, you could navigate to that folder and run your commands from there - though you might want to check if the specific git commands you're using can handle that)
EDIT If there are just one or a couple of folders than you always need to refer to, you could set up a shell variable as bstpierre suggests in his comment on your question.
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