How do I set the location of the working directory in Git?

Asked

Viewed 1,998 times

1

When installing Git, I couldn’t configure the location of my working directory.

I’ve already changed it to "Start at:"C: Users Renata Mendes Documents Projects"" in Git Bash properties, but the change is not saved and every time I start the terminal I have to manually enter the directory.

What’s the best way to do that?

P.S.: I’m a beginner in Git and Programming.

  • 3

    "Which" Git did you install? Example: git-scm, Tortoise git, etc.. What do you mean by "location of my working directory"? You only have a single git repository on your machine and you want the git prompt window to always open in the path of that repository? Or is it something else I didn’t understand?

2 answers

6

Hello,

I was able to change the git bash initial path by changing the 'start in' parameter in the properties, here it worked, I think the problem you are having is because of the space character. Try using a spaceless path to test.

Imagem das propriedades do git bash

  • Welcome to Stackoverflow in English. I edited your reply to remove the greetings as we usually keep the text as clean as possible to focus on your programming response. If you are interested in visiting a part of the site that is not aimed to ask questions can know the [chat]. If you have questions about the operation, rules and procedures of the site visit the [meta] :)

1

Hello,

Try to follow these steps:

1- Target field : remove what is after the quotes, leaving only the until ending "xxxxxx Git git-bash.exe" nothing else..

2-Field start on: Place the folder the shortcut you want to initialize the script.

That way when reopening Git Bash it will already be set to the path indicated in field 2.

inserir a descrição da imagem aqui

  • Welcome to Stackoverflow in English. I edited your reply to remove the greetings as we usually keep the text as clean as possible to focus on your programming response. If you are interested in visiting a part of the site that is not aimed to ask questions can know the [chat]. If you have questions about the operation, rules and procedures of the site visit the [meta] :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.