Is there a way to integrate Git into the Windows cmd or PowerShell? - so that it feels a bit like a Linux terminal. How?
Asked
Active
Viewed 1.2k times
6 Answers
13
OK, I got it myself ...
new-item -path alias:git -value 'C:\Program Files (x86)\Git\bin\git.exe'

Peter Mortensen
- 30,738
- 21
- 105
- 131

Tobias
- 7,282
- 6
- 63
- 85
-
1or `new-item -path alias:git -value 'C:\Program Files\Git\bin\bash.exe'` these days – Haohmaru Feb 09 '17 at 15:10
12
Download and install Git as shown in the link. In the sixth slide, 'Adjusting your PATH environment.', check for the option 'Run Git and included Unix tools from the Windows command prompt' and that's it!

Peter Mortensen
- 30,738
- 21
- 105
- 131

uday
- 8,544
- 4
- 30
- 54
10
This is what I use: posh-git: a PowerShell environment for Git
It also integrates into the cwd line:

ComFreek
- 29,044
- 18
- 104
- 156

NateTheGreat
- 2,295
- 13
- 9
0
why everybody here wants to literally "integrate" git into powershell?
- in powershell type
git
- now you are in bash (otherwise you don't have git as an env var)
but if you really want an integration, the easiest way is to "Download and install posh-git"

TechDogLover OR kiaNasirzadeh
- 4,566
- 27
- 33