Tobias
Tobias

Reputation: 7415

Is there a way to integrate Git into the Windows cmd or PowerShell?

Is there a way to integrate Git into the Windows cmd or PowerShell? - so that it feels a bit like a Linux terminal. How?

Upvotes: 13

Views: 13281

Answers (6)

why everybody here wants to literally "integrate" git into powershell?

  1. in powershell type git
  2. 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"

Upvotes: 0

NateTheGreat
NateTheGreat

Reputation: 2305

This is what I use: posh-git: a PowerShell environment for Git

It also integrates into the cwd line:

enter image description here

Upvotes: 10

suryakrupa
suryakrupa

Reputation: 4132

Simple and straightforward way:

Step by Step guide

Essentially

  1. Add Git binaries to the system path

Upvotes: 2

Tobias
Tobias

Reputation: 7415

OK, I got it myself ...

new-item -path alias:git -value 'C:\Program Files (x86)\Git\bin\git.exe'

Upvotes: 13

uday
uday

Reputation: 8730

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!

Upvotes: 12

Related Questions