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.

2
  • Have you tried cgwin? m.youtube.com/watch?v=fw2eR0_Dfyw Commented Feb 25, 2016 at 5: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). Commented Feb 25, 2016 at 5:51

1 Answer 1

13

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.

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.