'Git is not recognized in pycharm

I am trying to pull a github repository from bitbucket using pyCharm.

I added the path to my git executable under version control / Git and installed the bitbucket plugin. If I test both it says the test are running fine.

However when I open the terminal now and try to pull a rep like this:

 git pull https://[email protected]/marcvanderpeet1983/betfair_predictions.git

I get the following error:

 'git' is not recognized as an internal or external command,
 operable program or batch file.

Any thoughts on what goes wrong here?



Solution 1:[1]

The terminal has nothing to do with those options you have set. The terminal just forwards your commands to the operation system, in your case Windows. You have to add the path to git.exe in your PATH environment variable, log out and log back into windows to be able to use git from cmd.exe or the terminal you are trying to use.

The setting in PyCharm is just for the Git integration, so that PyCharm can use Git. So if you use the PyCharm GUI and menues to use Git, then the setting is used and works. And I guess with the BitBucket plugin you get additional GUI options for cloning, pull-requests and so on, but I don't konw as I don't use the BitBucket.

Solution 2:[2]

I had to close ALL of my PyCharm windows and then reopen the project for the updated system path to take effect in the PyCharm terminal.

Solution 3:[3]

I had a problem like this, Git suddenly stopped working and not recognized in PyCharm, I fixed this issue by in PyCharm: go to file > sitting > Plugins search for Git and GitHub and check them restart PyCharm

Git will work and be recognized again.

Thanks

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Vampire
Solution 2 Dgomn D
Solution 3 Tag ElMaaly Hassan