Git for Windows SDK... Reloaded!

277 views
Skip to first unread message

Johannes Schindelin

unread,
Apr 11, 2018, 7:18:18 AM4/11/18
to git-for...@googlegroups.com
Hi team,

I uploaded a new SDK installer to
https://github.com/git-for-windows/build-extra/releases/tag/git-sdk-1.0.7.
This is very different from the previous version, as it now clones
(shallowly) https://github.com/git-for-windows/git-sdk-64 (or -32) and
runs `git-bash.exe`.

That is the New Way To Do Things, as I can make it much more reliable that
way (as opposed to the old way, where Pacman and/or MSYS2 would break
things in most surprising ways, especially likely during times when I
cannot spare a big effort to fix things).

Please let me know how you fare with that one.

Ciao,
Johannes

P.S.: There are now two ways to keep this up to date: `pacman -Syyu` or
`git pull`. Both have their pros and cons, and both have nasty edge cases:
if you update with `pacman -Syyu`, Pacman may mess things up, and the
worktree will be forever dirty. If you update with `git pull` and have
custom Pacman packages installed, they will *not* be updated. In both
cases, if the Git package or the MSYS2 runtime or the Bash need to be
updated, you cannot update from inside the SDK, you have to do it “from
the outside”. For `git pull`, that means pulling using a regular Git for
Windows installation. For `pacman -Syyu`, that means opening a cmd or
Powershell, cd’ing to the top-level, setting the environment variable
MSYSTEM=MINGW64 (or *32) and then running: usr\bin\bash.exe -lc “pacman
-Syyu”

Contributions to help ease SDK updates are very, very welcome!

Johannes Sixt

unread,
Apr 11, 2018, 1:47:15 PM4/11/18
to Johannes Schindelin, git-for...@googlegroups.com
Am 11.04.2018 um 13:18 schrieb Johannes Schindelin:
> I uploaded a new SDK installer to
> https://github.com/git-for-windows/build-extra/releases/tag/git-sdk-1.0.7.
> This is very different from the previous version, as it now clones
> (shallowly) https://github.com/git-for-windows/git-sdk-64 (or -32) and
> runs `git-bash.exe`.

Thank you very much for providing this new enviroment. I cloned from
that repository, and it worked well so far. I'm using it in my daily
work now.

> P.S.: There are now two ways to keep this up to date: `pacman -Syyu` or
> `git pull`. Both have their pros and cons, and both have nasty edge cases:
> if you update with `pacman -Syyu`, Pacman may mess things up, and the
> worktree will be forever dirty.

I ditched the .git directory to safe 1/2 GB of diskspace that was taken
by the pack file. I used and plan to use pacman from now on. We'll see
how well it fares.

> For `pacman -Syyu`, that means opening a cmd or
> Powershell, cd’ing to the top-level, setting the environment variable
> MSYSTEM=MINGW64 (or *32) and then running: usr\bin\bash.exe -lc “pacman
> -Syyu”

Is this MSYSTEM thingie required for pacman, bash, or uname, or all of
them? I did not have MSYSTEM set for all pacman commands. I have it set
now permanently to MINGW64 to be able to build git.

-- Hannes

Johannes Schindelin

unread,
Apr 11, 2018, 5:03:41 PM4/11/18
to Johannes Sixt, git-for...@googlegroups.com
Hi Hannes,
It is required for MSYS2's Bash profile to set up the environment
correctly, e.g. the PATH.

This is particularly important for Pacman, as some packages run
"post-install" scripts that expect certain things in the PATH.

> I did not have MSYSTEM set for all pacman commands. I have it set now
> permanently to MINGW64 to be able to build git.

If you must use CMD, why not start git-cmd.exe, which lets you *not* set
that environment variable permanently.

You may need to set it to MSYS e.g. when building a custom MSYS2 runtime
or a Bash, after all.

Ciao,
Dscho
Reply all
Reply to author
Forward
0 new messages