We help IT Professionals succeed at work.

git update..

In an attempt to upgrade git in my computer, I checked to see what version I already have using:
PS C:\users\mike\gitcode\GitFundamentals> git --version
git version 1.9.5.msysgit.0

Then using the line of code from http://git-scm.com/book/en/v2/Getting-Started-Installing-Git at the very end of the page, I ran:

PS C:\users\mike\gitcode\GitFundamentals> git clone git://git.kernel.org/pub/scm/git/git.git

When it was finished, I checked again the version using:
PS C:\users\mike\gitcode\GitFundamentals> git --version
git version 1.9.5.msysgit.0

Question: Why it has not updated to newer version (2.0 or above)?

What have I done wrong?

See the list of activities it performed:
PS C:\users\mike\gitcode\GitFundamentals> git clone git://git.kernel.org/pub/scm/git/git.git
git.exe : Cloning into 'git'...
At line:1 char:4
+ git <<<<  clone git://git.kernel.org/pub/scm/git/git.git
    + CategoryInfo          : NotSpecified: (Cloning into 'git'...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Checking out files:   6% (192/2770)   
Checking out files:   7% (194/2770)   
Checking out files:   8% (222/2770)   
Checking out files:   9% (250/2770)   
Checking out files:   9% (272/2770)   
Checking out files:  10% (277/2770)   
Checking out files:  11% (305/2770)   
Checking out files:  12% (333/2770)   
Checking out files:  13% (361/2770)   
Checking out files:  14% (388/2770)   
Checking out files:  15% (416/2770)   
Checking out files:  16% (444/2770)   
Checking out files:  16% (454/2770)   
Checking out files:  17% (471/2770)   
Checking out files:  18% (499/2770)   
Checking out files:  19% (527/2770)   
Checking out files:  19% (545/2770)   
Checking out files:  20% (554/2770)   
Checking out files:  21% (582/2770)   
Checking out files:  21% (592/2770)   
Checking out files:  22% (610/2770)   
Checking out files:  22% (631/2770)   
Checking out files:  23% (638/2770)   
Checking out files:  24% (665/2770)   
Checking out files:  24% (690/2770)   
Checking out files:  25% (693/2770)   
Checking out files:  26% (721/2770)   
Checking out files:  27% (748/2770)   
Checking out files:  28% (776/2770)   
Checking out files:  28% (798/2770)   
Checking out files:  29% (804/2770)   
Checking out files:  29% (822/2770)   
Checking out files:  30% (831/2770)   
Checking out files:  31% (859/2770)   
Checking out files:  31% (865/2770)   
Checking out files:  31% (881/2770)   
Checking out files:  32% (887/2770)   
Checking out files:  32% (905/2770)   
Checking out files:  33% (915/2770)   
Checking out files:  33% (936/2770)   
Checking out files:  34% (942/2770)   
Checking out files:  34% (958/2770)   
Checking out files:  35% (970/2770)   
Checking out files:  36% (998/2770)   
Checking out files:  37% (1025/2770)   
Checking out files:  37% (1032/2770)   
Checking out files:  38% (1053/2770)   
Checking out files:  38% (1069/2770)   
Checking out files:  39% (1081/2770)   
Checking out files:  40% (1108/2770)   
Checking out files:  40% (1133/2770)   
Checking out files:  41% (1136/2770)   
Checking out files:  42% (1164/2770)   
Checking out files:  43% (1192/2770)   
Checking out files:  44% (1219/2770)   
Checking out files:  45% (1247/2770)   
Checking out files:  46% (1275/2770)   
Checking out files:  47% (1302/2770)   
Checking out files:  48% (1330/2770)   
Checking out files:  49% (1358/2770)   
Checking out files:  50% (1385/2770)   
Checking out files:  51% (1413/2770)   
Checking out files:  51% (1416/2770)   
Checking out files:  51% (1433/2770)   
Checking out files:  52% (1441/2770)   
Checking out files:  53% (1469/2770)   
Checking out files:  53% (1478/2770)   
Checking out files:  54% (1496/2770)   
Checking out files:  55% (1524/2770)   
Checking out files:  55% (1537/2770)   
Checking out files:  56% (1552/2770)   
Checking out files:  57% (1579/2770)   
Checking out files:  57% (1592/2770)   
Checking out files:  58% (1607/2770)   
Checking out files:  58% (1627/2770)   
Checking out files:  59% (1635/2770)   
Checking out files:  59% (1652/2770)   
Checking out files:  60% (1662/2770)   
Checking out files:  61% (1690/2770)   
Checking out files:  61% (1691/2770)   
Checking out files:  62% (1718/2770)   
Checking out files:  62% (1743/2770)   
Checking out files:  63% (1746/2770)   
Checking out files:  64% (1773/2770)   
Checking out files:  65% (1801/2770)   
Checking out files:  66% (1829/2770)   
Checking out files:  67% (1856/2770)   
Checking out files:  67% (1881/2770)   
Checking out files:  68% (1884/2770)   
Checking out files:  69% (1912/2770)   
Checking out files:  70% (1939/2770)   
Checking out files:  71% (1967/2770)   
Checking out files:  72% (1995/2770)   
Checking out files:  72% (2010/2770)   
Checking out files:  73% (2023/2770)   
Checking out files:  74% (2050/2770)   
Checking out files:  75% (2078/2770)   
Checking out files:  76% (2106/2770)   
Checking out files:  77% (2133/2770)   
Checking out files:  78% (2161/2770)   
Checking out files:  79% (2189/2770)   
Checking out files:  80% (2216/2770)   
Checking out files:  80% (2232/2770)   
Checking out files:  81% (2244/2770)   
Checking out files:  82% (2272/2770)   
Checking out files:  83% (2300/2770)   
Checking out files:  84% (2327/2770)   
Checking out files:  85% (2355/2770)   
Checking out files:  86% (2383/2770)   
Checking out files:  87% (2410/2770)   
Checking out files:  88% (2438/2770)   
Checking out files:  88% (2440/2770)   
Checking out files:  89% (2466/2770)   
Checking out files:  90% (2493/2770)   
Checking out files:  91% (2521/2770)   
Checking out files:  92% (2549/2770)   
Checking out files:  93% (2577/2770)   
Checking out files:  93% (2600/2770)   
Checking out files:  94% (2604/2770)   
Checking out files:  95% (2632/2770)   
Checking out files:  95% (2638/2770)   
Checking out files:  96% (2660/2770)   
Checking out files:  97% (2687/2770)   
Checking out files:  97% (2697/2770)   
Checking out files:  98% (2715/2770)   
Checking out files:  99% (2743/2770)   
Checking out files:  99% (2768/2770)   
Checking out files: 100% (2770/2770)   
Checking out files: 100% (2770/2770), done.

Open in new window

Comment
Watch Question

Top Expert 2014
Commented:
Calling external executables within PowerShell can present challenges, specifically in regards to passing arguments to those executables.
If you're running PS 3.0+, you might try
git --% clone git://git.kernel.org/pub/scm/git/git.git

Open in new window

Mike EghtebasDatabase and Application Developer

Author

Commented:
I think, currently I don't have PS 3.0 or higher yet. I will use you code after I get it installed.

I suppose, upgrading PS is not as simple task (like most Microsoft software difficult to upgrade). I have to do lots of preparation first including uninstalling my existing version of PS.

Would you please tell:

1. how to get my current ps version level at PS (I probably have it somewhere  in my notes I can look for it unless you can give it to me here).

2. What are the steps I need to follow to upgrade PS.

Thanks,

Mike
Mike EghtebasDatabase and Application Developer

Author

Commented:
Top Expert 2014

Commented:
Upgrading is simple.  If you haven't installed any preview releases you don't have to uninstall anything.  You just had a question open regarding this.  The steps are included on the WMF download page.  All you need to do is make sure you meet the prerequisites and then run the installer.
mccarlIT Business Systems Analyst / Software Developer
Top Expert 2015

Commented:
To answer the question that you initially asked though...

The reason that that "git clone ...." line (at the very end of the linked page) didn't do what you expected, was because that line was related to the others just before it, ie. the "Installing from source" section. What was 100% clear about that part was that as well as running the "git clone..." you would also have had to re-compile the new sources files it downloaded. So all of this is assuming that you initially installed git from source, which I am pretty sure that you wouldn't have.

As for how to correctly update git when using msys, I'm sorry I couldn't help you there. I steer clear of all thing msys and cygwin if I can help it!