tolga
tolga

Reputation: 2800

bash: git: command not found in MSYS

I already have git in my computer and I can use it.

I installed msys and:

pacman -Syu

This upgraded many packages. When I try to git clone in msys terminal, I get this response:

bash: git: command not found

How can I use git in MSYS?

Upvotes: 4

Views: 7031

Answers (2)

Piotr Kundu
Piotr Kundu

Reputation: 36

If you downloaded "Git for Windows" then that installs MSYS2 but it's different to the MSYS you installed. They would not know about each other. You can merge the to as this guy writes (number 3): https://www.automationdojos.com/install-pacman-on-git-for-win-without-full-setup/

If you start fresh, the I would get MSYS2 first, then use pacman to install mingw64 toolchain and mingw64 version of git - which is what you get when you install "Git for Windows": https://gist.github.com/piotrkundu/e7d94204dd3c48525b23c59fe5d23478

pacman -S git will get you the MSYS version of git which runs with POSIX emulation (potentially slower).

Upvotes: 0

tolga
tolga

Reputation: 2800

I found an answer:

pacman -S git

Now I can use git in my mysy terminal.

Upvotes: 7

Related Questions