What is the command to set startup directory in Git Bash?
When I start Git Bash, the startup directory is Bitbust directory in C drive, so I must change the working directory with cd
command.
But I think it is an unnecessary process. I want the startup directory to be my working directory where Git Bash is started.
Right click on the shortcut, and select properties. Navigate to the "shortcut" tab.
There are two things you need to change here. First, by default, the Target field will end in --cd-to-home
- remove it. Once you've done that, you can edit the Start in
field and give it any directory you want.
E.g., this is how the shortcut looks on my machine:
After editing, you'll have:
You could also, of course, create multiple Git Bash shortcuts to start in each directory you're interested in.
Here is a quick fix;
Instead of opening git and navigating to the folder you want by using cd /long/path/to/your/files do as below;
In Windows 10,
Here is how it looks when you right click
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