Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enabling git in Windows 10 command line

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.

like image 393
Vendea Avatar asked Feb 25 '16 05:02

Vendea


1 Answers

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.

like image 60
VonC Avatar answered Oct 23 '22 12:10

VonC