'git' is not recognized as an internal or external command - windows

I created Android Project in Android Studio, now that I would like to push it into my repository.
When I enter the following command in Android Studio terminal:
git remote add origin https://..........
The following error is returned:
git is not recognized as an internal or external command, operable program or batch file.`
How can I fix this?

If "git" is not installed then you need to install git and while installation select option 'Use Git from the Windows Command Prompt'.
If "git" is installed but still you are getting "git is not recognized as an internal or external command" error then you need to set PATH variable to point to git executable. To do that follow the steps below:
Open My Computer, right click and select Properties
On this window, click on Advanced System Settings link which will open System Properties popup.
In that popup (under Advanced tab), click on Environment Variables which will open Environment Variables popup.
In that popup, select Path and click on Edit, which will open Edit Environment Variable popup
From that popup window, click on Browse and browse to the git installation directory. Mostly it would be "C:\Program Files (x86)\Git\bin", select the directory and click Ok on all opened popups.
You will need to close command prompt and open again. Git command should work now!

Most probably Git is not installed on your machine (or installed incorrectly). Open this link to download an installer. It should do the job for you.
There are also other ways to install Git on Windows.

When you install Git, you must select the option 'run Git from the Windows command prompt'?
Download the latest version of the Git from here : http://git-scm.com/download and try again!

Related

Problems after installation of git Bash

After git bash installation I lost option to create new file from right click context menu folder in Windows 10.
When I right click on desktop instead of "new" there is only get Gui Here and Git Bash here, option to create new is invisible.
After I uninstalled Git Bash from pc I lost it all, there is no git and create new folder settings.
Uninstalling Git bash would uninstall Git for Windows itself.
As an alternative, it is best to install it without the Windows Explorer integration, and to use the regular "Open command window here." contextual menu option:
Then you can type "bash", and you are in a bash session.

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://marcvanderpeet1983#bitbucket.org/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?
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.
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.
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
While integrating PyCharm Community with my GitHub account, I found that following these two steps worked for me (on Windows).
Download Git separately from here
Changing Paths: Type Environment Variable in the start menu -> Select Environment Variable at the bottom -> Under System Variables Double-click Path -> In the new popped window click New -> Add C:\Program Files\Git\cmd & C:\Program Files\Git\bin\ at the bottom of the list
Restart system after closing all running apps > reopen PyCharm

Windows 10 cannot recognize Git

I have installed Windows 10 x64 on my laptop, and then go with latest Git as well (Git-2.6.3-64-bit). As I see on my laptop, Git now is installed at this directory: C:\Users\MyPC\AppData\Local\Programs\Git (I have no chance to specify another particular folder because it's done automatically during Git installation). The options "Use Git from the Windows Command Prompt" and "Use OpenSSH" are already selected, the windows path is updated with Git dir. And after all, the problem is, Windows cannot recognize where Git is to call. I've tried git --version but it's unrecognized from Windows.
My questions are (on Windows 10 Pro x64):
1. Can we specify another installation folder for Git?
2. In Git dir/bin, there no ssh.exe, while in OpenSSH selection dialog, it tells me "This uses ssh.exe that comes with Git". So where is it, the built-tin SSH client?
3. I'm doubting that now Windows 10 doesn't accept any external program installed on %USERPROFILE%/AppData to be included to system path. Is it correct?
4. How to make Windows "see" Git?
Just solved this myself this was a very frustrating journey but for me the following got me going:
Make sure c:\Windows\System32\OpenSSH\ is in your path variables (yea I know Windows should see this on its own)
Go to C:\Users\<>.gitconfig edit your global git config file to point to the correct ssh.exe 'C:/Windows/System32/OpenSSH
Make sure your id_rsa.ppk file is in C:\Users\<>.ssh If you don't have an SSH key yet generate one and make sure it ends up in this folder
You may also want to check that your OpenSSH Authentication Agent is started in Windows Services
Can we specify another installation folder for Git?
Try running the installer as an administrator, so it can be installed to Program Files. I'm not sure how to specify a custom path.
In Git dir/bin, there no ssh.exe, while in OpenSSH selection dialog, it tells me "This uses ssh.exe that comes with Git". So where is it, the built-tin SSH client?
Some digging told me that it might live inside the .ssh folder in the Git installation, so C:\Users\MyPC\AppData\Local\Programs\Git\.ssh
I'm doubting that now Windows 10 doesn't accept any external program installed on %USERPROFILE%/AppData to be included to system path. Is it correct?
AFAIK you can add any directory to your path.
How to make Windows "see" Git?
Add C:\Users\MyPC\AppData\Local\Programs\Git to your path:
Start the System Control Panel applet (Start - Settings - Control Panel - System).
Select the Advanced tab.
Click the Environment Variables button.
Under System Variables, select Path, then click Edit.
You'll see a list of folders, as this example for my system shows: C:\Program Files\Windows Resource Kits\Tools\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Support Tools\;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:\Program Files\Common Files\Ulead Systems\MPEG;C:\Program Files\Intel\DMIX;C:\Program Files\Executive Software\Diskeeper\;C:\Program Files\Bonjour\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Misc
You can add additional folders that you want to include in searches. I add a "C:\program files\misc" entry into which I place my standalone utilities, instead of copying them into C:\windows. Click OK.
You'll need to restart the processes (e.g., command prompt) that use the system path to see the added folders.
From http://windowsitpro.com/systems-management/how-can-i-add-new-folder-my-system-path

Cannot find git while installing foundation

I am new to ZURB Foundation and trying to install it through Ruby CLI.
I have successfully installed ZURB Foundation and now I want to create a new project with this command:
foundation new myFound
It gives me an error saying:
Can't find Git.
I have installed Git on my system but still have this error. I run on Windows. Any suggestions?
You have to check this option during the installation to add Git on PATH:
Use Git from the Windows Command Promt
Picture
If you didn't do it you can reinstall the Git or add it on the PATH manually (I assume that your Git's installation folder is C:\Program Files (x86)\Git - if doesn't, change it to yours).
Command line approach
set PATH=%PATH%;C:\Program Files (x86)\Git\bin
Graphical approach
Select Computer from the Start menu
Choose System Properties from the context menu
Click Advanced system settings > Advanced tab
Click on Environment Variables
Select Path in the section System Variables and edit it
add ;C:\Program Files (x86)\Git\bin at the end and save it

Installing vim-fugitive on windows 7

I'm a vim newbie, trying to install vim-fugitive on windows 7. I followed the instructions on the script's github site without success.
If I run :Git I get the Not an editor command :Git error.
Any ideas ?
fugitive only defines it's functions when you are inside a git controlled folder, so you'll have to initialize git in that folder before loading one of the folder's files to vim.
Simply run git init in that folder, and than open any file in that folder with vim, and you should have all of fugitive's commands working.
I ran into this same issue, here is how I solved it.
Right click on "Computer" from the "Start Menu".
Click on "Advanced system settings".
Click on "Environment Variables".
Go down to the "Path" variable under "System variables".
Click on "Edit..." then add to the end of the "Variable value the location of your git bin directory, mine was "C:\Program Files (x86)\Git\bin".
Close out all vim sessions, and command prompts. At this point you should be able to open a command prompt and type "git" and you should get a list of commands. If that works your Fugitive commands should work as well.
Hope this helps!
On Windows, if you install msysgit, and check the following box, fugitive should work out of the box just as on Mac or Linux.

Resources