Dor Ben Zaken
Dor Ben Zaken

Reputation: 115

Git bash doesn't save repository path

I'm using git bash and I have one problem.

When I open the git bash and I write "pwd" I get the current path of git. I get something like this:

c:/users/bla

Every time I have to change the path with "cd" command. Why doesn't git save my repository path like it saves my username and email?

Upvotes: 1

Views: 295

Answers (1)

merlin2011
merlin2011

Reputation: 75669

The current working directory is a property of bash, not something normally saved in git.

If you want to start in a particular path, then just add the appropriate cd command to the file ~/.bashrc. You can do this with the following command inside git-bash.

echo 'cd what/ever/you/want' >> ~/.bashrc

Upvotes: 1

Related Questions