+4 votes
1 view
in Devops and Agile by (22.3k points)

I just upgraded to Git 1.8.0.1 for Windows, from my previous version 1.7.9.mysysgit.0. I downloaded the new version from the Git site and installed it through the normal Git installer EXE.

That said, when I fire up my terminal window, it still is showing that I am running git version 1.7.9.mysysgit.0. When I type "git --version" from my prompt, same thing.

I found this article on a similar issue with Git on Mac OSX, which leads me to believe that it has something to do with a faulty PATH, but I'm still pretty new at all this (5 months self-taught), so I'm at a loss in how to translate this to Windows.

This problem arose when I began a new Rails project and tried to push it up to Git. I added the remote:

git remote add origin git@github.com:xxxx.git

then:

git push -u origin master

I received the following error message:

fatal: https://github.com refs not found: did you run git update-server-info on the server?

1 Answer

+4 votes
by (16.9k points)
edited ago by

Since Git 2.16.1 you can use

C:\> git update-git-for-windows

In versions between 2.14.2 and 2.16.1, the command was

C:\> git update

Versions before this don't work so you need to download the greater version on which this work.

If the version is updated and having latest version then this command will give you the following output: 

C:\> git update-git-for-windows

Git for Windows 2.17.0.windows.1 (64bit)

Up to date

For better understanding about these commands go through the following crash course on git that will help you to understand git well

 

...