views:

516

answers:

3

I'm on a vista laptop, trying out git for the first time.

I installed the msysgit version, and it installed a "git bash" shortcut on the desktop. When I run it, it seems to run in a cygwin kind of box, where C:\ is /c/

Is it safe to use git from the windows command line where /c/ is C:\? does that create any conflict with the way git expects the pathes to be like?

What about, if I init from the bash/cygwin console, then commit from the windows console? Does that create any trouble?

+2  A: 

Note: Keep in mind that git does not track where the repository is at -- just references. In other words you can cleanly move an entire git directory (.git + working tree) and it still works fine.

It should work in either case assuming your environment variables allow you to run git from the windows command line.

Both point to the same actual directories (although referenced differently), and use the same executable to modify the repository.

gahooa
cool, the "Note" part should be the first paragraph :)
hasen j
A: 

After installing msysgit, you should be able to right click on an empty folder and see options "Git GUI here" and "Git BASH here". If you click Git GUI here it will open a GUI. Have fun!

Rayne
that's ok, I want to use it from the command line
hasen j
Well, the topic says "Git without bash/cygwin"...
Rayne
I meant that I want to use the windows command line
hasen j
+1  A: 

When you install MSYS Git, it will give you 3 options related to system paths. Which one you choose will determine how you can use it. It sounds like you want the 3rd option, "Run Git and included tools from the windows command prompt". This will put all of the git-related binaries in the system path, allowing you to use git from a normal command prompt. Be aware that it also overrides a few built-in windows tools, as the warning in the installer says.

Gabe Moothart
I chose the 2nd options, which also adds git to the PATH, but, because of the "warnings" here and there .. I thought it might not be very stable or something!
hasen j
I think the 2nd option will cause git to fail on some operations from a windows command prompt (unless you manually adjust the PATH).I use the third option, and it is stable. I don't use the windows exes that get overridden (find.exe, etc.), and if I did I could just specify their full path.
Gabe Moothart
hmm, it could fail? what operations will it fail on? Maybe I'll turn this to a new question
hasen j