Reputation: 1264
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.
Upvotes: 2
Views: 6198
Reputation: 136984
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.)
Upvotes: 2