Skip to content

Instantly share code, notes, and snippets.

@kujiy
Last active April 20, 2023 13:55
Show Gist options
  • Save kujiy/4f5c0b6e7ab47a1637e4 to your computer and use it in GitHub Desktop.
Save kujiy/4f5c0b6e7ab47a1637e4 to your computer and use it in GitHub Desktop.
How to open a specific folder with git-bash.exe from a command line(shell)
With argument
"C:\Program Files\Git\git-bash.exe" "--cd=%1"
Direct
"C:\Program Files\Git\git-bash.exe" "--cd="C:\YOUR\FOLDER\"
@kujiy
Copy link
Author

kujiy commented Nov 17, 2015

How do I check what command is bound to "Git Bash Here"?
http://stackoverflow.com/questions/29050474/cmd-command-for-git-bash-here

Open the Registry Editor regedt32 or regedit.

Menu "Edit" > "Find" > "Find what" and enter "git_shell"

Examine the returned Registry entries.

One will be:

HKEY_CLASSES_ROOT\Directory\shell\git_shell\command

@kujiy
Copy link
Author

kujiy commented Nov 17, 2015

Now I need how to execute a command with startup.... Anyone knows?

@happycollision
Copy link

Did you ever find out how? I am trying to find the same answer now.

@lukasz-pyrzyk
Copy link

Works fine, thanks!

@samiraguiar
Copy link

Thanks!

@abhivemp
Copy link

abhivemp commented Nov 3, 2020

@kujiy and @happycollision
You can add the script through the task wizard if you are using Win10
This
article helped me run a set of batch scripts when my PC starts

@happycollision
Copy link

Hah. 🧟

Thanks for the help @abhivemp!

@nick2525
Copy link

nick2525 commented Feb 4, 2022

I have also have same problem in gitforwindows, which has cygwin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment