I want to use the new worktree
functionality introduced in git 2.5
. However, I don't know how to update to the most recent version of GitHub Desktop (not git itself).
I install GitHub for desktop and hoped it ships with the most recent version, however git --version
returns git version 1.9.5.github.0
. But if I understand correctly, we're already at version 2.6.x! So how can I update to this version on my Windows machine, where the only version of git I installed was with the GH Desktop?
You can find the Windows Git installer here: http://www.git-scm.com/
For best results, I suggest uninstalling Github desktop, installing Git (which you downloaded from the above link), and reinstalling the Github client.
The instructions describing the steps required to update github for windows are listed here:
In the upper-right corner of the Github for Windows, click the icon that looks like a little gear or cog (see image example).
Choose About GitHub Desktop from the menu initiated when you clicked the icon in step 1.
If an update is available, you will be permitted to click Restart to install update.
here is the link to all the steps screen grabbed off the app on imgur
If you want to use
worktree
why don't you install MSYS2 ?MSYS2 is a fork of mSysGit which is not maintained anymore
It's like a unix console and you can update your own git version thanks to Pacman which is a package manager from Archlinux
I hope you'll find this helpful !
Regards
EDIT : If you only want to use "Git For Windows", here is the last release which comes with Git v2.6.3.
Update Nov. 25th, 2015.
For what it is worth, GitHub Desktop (finally) uses a more recent git version: 2.5. See Brendan Foster tweet.
Original answer (early Nov 2015)
First, the latest git for windows release is available here on GitHub.
I always use the archive portable form (unzipped anywhere I want, and added to the
PATH
).But if you have chosen the
exe
setup, that means it has been installed inC:\Program Files\Git
.However, as I mentioned here, git is also included in GitHub Desktop own installation path (
%USERPROFILE%\AppData\Local\GitHub\PORTAB~1\bin
)You could, in theory, replace the exact value of the folder PORTAB~1 by a directory JUNCTION:
In my latest GitHub Desktop 3.0.7.1 3397ae4, I see:
However, that would not work: when starting GitHub Desktop again, it would detect the change and restore its own embedded Git version (1.9.5)
So you can't force easily GitHub Desktop to use another git version.
Even if you were able somehow to force GitHub for Desktop to use another version of Git, you would have to carefully report its own internal git system configuration:
This file points to GitHub Desktop specific settings:
THose settings are not present in a non-GitHub embedded version of Git, and would need to be restored.