2

On Github for Windows I can right click on a project, select "Open In Git Shell" and I can execute git commands against that project.

What will be the direct command line command for opening git console for my project (without opening Github for Windows)? It must be something easy, but I am lost in Google and SO search results.

1 Answer 1

2

By default, this command opens up a Bash session instead of a standard Windows cmd.exe session. So first you should run "Git Shell" from the start menu (Git Shell will invoke a Bash session for you). Then simply cd to the root directory of your repository.

Note that Bash uses Unix syntax for paths, unlike from cmd.exe and other Windows software. It uses forward slashes instead of backslashes, and "dives" are rooted at /. So, for example, to work on a repository located at C:\Users\SM79\Desktop\My Project\ you would run something like cd /c/Users/SM79/Desktop/My\ Project/.

Tab completion can be very helpful, especially when working with directories like My Project that contain spaces. (Typing the My and pressing Tab should complete the directory, including escapes for spaces or other reserved characters, as far as possible without ambiguity.)

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks. For some reason, on my system it is called Git Shell, not Git Bash.
@SM79 My mistake, I was answering from memory. I've updated my answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.