8

I cannot seem to make git work from my native Windows command line.
I have tried PowerShell, I have the path to the git bin in my Environment Variables, but it is still giving me a "command not found" when I type git. I have looked at the solutions here, and none of them work for me.
I don't have a C:/Program Files/git folder (or Program Files(x86)).

I can make command line git work if I open up the git desktop app and then use the "open a terminal with git enabled" option from there.

That is all well and good, except that opening the desktop app takes forever on my laptop, and I would prefer to be able to just whip out the command line to pull my code.

I am open to reinstalling git and following specific instructions, or installing a more workable version of git, if anyone has suggestions. Thank you.

Community
  • 1
  • 1
Vendea
  • 135
  • 1
  • 1
  • 8
  • Have you tried cgwin? http://m.youtube.com/watch?v=fw2eR0_Dfyw – tutley Feb 25 '16 at 05:46
  • 1
    Personally, I'd suggest you install "Git Bash" when you install git on windows (It's an option during the install). It installs a Mingw32 git command-line which emulates the linux command line. You can still traverse your drives and everything, but the directory arguments play better with git (since it wasn't really built for windows). – kondrak Feb 25 '16 at 05:51

1 Answers1

12

Simply uncompress the latest git for windows release portable archive (like PortableGit-2.7.2-64-bit.7z.exe) anywhere you want and add to your PATH:

 c:\path\to\git;c:\path\to\git\bin;c:\path\to\git\usr\bin;c:\path\to\git\mingw64\bin

You will get git-bash.exe (recent 4.3+ bash based on msys2), but also 200+ unix commands right in your regular CMD shell.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283