I have installed GIT for Windows right now. And when I am running this into my symfony project to reinstall the vendors by
php bin/vendors install --reinstall
Then i am getting an error
git' is not recognized as internal or external command
I have set the environmental variables also as
c:/programme files/git/cmd
Now what should I do? I have tried also for environmental variables
c:/program files/git/bin
but I am getting the same error
To install Git, navigate to your command prompt shell and run the following command: sudo dnf install git-all . Once the command output has completed, you can verify the installation by typing: git version .
A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in a directory that Git doesn't know about. In these cases, the fix is to make sure that you are both working in the correct folder and that you set up your repository right.
If the Git path is not configured correctly, you could also receive the error “git is not recognized as an internal or external command, operable program or batch file”. You can try reinstalling Git for Windows to set the path automatically.
Open a command prompt. To launch GitHub Desktop to the last opened repository, type github . To launch GitHub Desktop for a particular repository, type github followed by the path to the repository. You can also change to your repository path and then type github . to open that repository.
Two possible solutions:
PATH
has backslashes instead of forward ones.c:\program files\git\cmd
One more: If your path includes spaces, enclose it in quotes:
set PATH=%PATH%;"C:\Program Files\Git\cmd"
During Git installation, in the path environment settings chose the following one. Even I had the same problem, of git not executed on my normal Command Line, but i just reinstalled it with the setting "Run Git from the Windows Command Prompt"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With