I am having trouble determining the difference between MSysGit and Git for Windows. How are they different? Why would I choose one over the other?
Are they not the same thing?
On: http://msysgit.github.com/ The title is Git for Windows, the application is msysgit.
Even in the event they are not, I expect the only differences will be in the method of compilation (i.e. compiler used and any options set) and any extraneous packaging (such as having a bash emulating shell as in msysgit). The actual product (Git itself) should remain broadly similar.
Edit: Thanks to Jarrod for pointing this out. I've left the above in for posterity. To quote the wiki:
msysGit is the development environment
to compile Git for Windows. It is
complete, in the sense that you just
need to install msysGit, and then you
can build Git. Without installing any
3rd-party software.
msysGit is not Git for Windows; that
is an installer which installs Git --
and only Git.
It is easy to see the difference: the
installers for Git have the prefix
Git-, the msysGit installers have the
prefix msysGit-. Another telltale is
that the msysGit installers come in
two flavors: fullinstall and
netinstall. Further, msysGit does not
install to C:\Program Files by
default. But msysGit comes with gcc,
the GNU C Compiler.
So, the difference between the two projects:
msysGit is the msys+mingw environment + everything needed to compile Git yourself, on Windows.
Git for Windows is exactly that: Git, compiled for Windows.
(Now) they are the same (as of May 2015 but likely a bit earlier):
"msysgit" and "Git for Windows" have merged under the name "Git for Windows." msysgit.github.io now hosts "Git for Windows" and the main git download site git-scm.com lists msysgit.github.io as the maintained build for windows.
From the updated wiki:
... we decided to just phase out the name "msysGit" (as well as the GitHub org of the same name) and work on Git for Windows (with the corresponding GitHub org, and using the name "Git for Windows" for the installer aimed at "end-users" and "Git for Windows SDK" for the development environment targeting Git for Windows developers).
Here is the excerpt 'Official README'
"portable" version of Git for Windows (MSysGit) does not need tobe installed. It will run from any directory you place it in, evenonto a USB thumbdrive. It will not write permanent entries into the Windows registry. It does not need administrator privileges to "install". This version does not offer you the convenient right-click context menu entries "Git GUI Here" and "Git Bash Here", because these would require to add entries into the Windows registry.
Git for Windows is newer than msysGit. If you want to use Git version 2.x you need to download from https://github.com/git-for-windows/git/releases. https://github.com/msysgit/git/releases is used for Git version 1.x.
Some technical details from https://github.com/git-for-windows/git/wiki/FAQ
Git for Windows used to be developed using the development environment called "msysGit", but roughly coinciding with Git 2.1, msysGit was superseded by a new development environment: the Git for Windows SDK.
As many answers in this post are old.
As on Nov 2015,
msysGit-based Git for Windows 1.x is now superseded by Git for Windows 2.x.
Git for Windows and git-scm both points to same download location for their binary
Download Location:
https://github.com/git-for-windows/git/releases/download/v2.7.1.windows.2/Git-2.7.1.2-64-bit.exe
The titles on the download page have just been updated so that the "Git for Windows" versions are fully identified. There is now both an 'installed' version (with right click menu options), and a Portable version that runs direct from a memory stick etc.
From what I understand Git on Windows is the project consisting of the four bulletpoints below.
Taken directly from https://github.com/msysgit/msysgit/wiki:
Git on Windows
To make the milky 'soup' of project names more clear, we say like this:
msysGit - is the name of this project, a build environment for Git
for Windows, which releases the official binaries
MinGW - is a minimalist development environment for native Microsoft Windows applications.
MSYS - is a Bourne Shell command line interpreter system, is used by MinGW (and others), was forked in the past from Cygwin
Cygwin - a Linux like environment, which was used in the past to build Git for Windows, nowadays has no relation to msysGit
This is a more clear general comparison right from their site https://github.com/msysgit/msysgit
Git for Windows is the software package that installs a minimal environment to run Git on Windows. It comes with a Bash (a Unix-type shell), with a Perl interpreter and with the Git executable and its dependencies.
On the other hand, msysGit is the software package installing the build environment that can build Git for Windows. The easiest way is to install it via the net installer.
Git for Windows is probably what you want. It includes the following primary features:
Git BASH Git for Windows provides a BASH emulation used to run Git
from the command line. *NIX users should feel right at home, as the
BASH emulation behaves just like the "git" command in LINUX and UNIX
environments.
Git GUI As Windows users commonly expect graphical user
interfaces, Git for Windows also provides the Git GUI, a powerful
alternative to Git BASH, offering a graphical version of just about
every Git command line function, as well as comprehensive visual diff
tools.
Shell Integration Simply right-click on a folder in Windows
Explorer to access the BASH or GUI. The Git-Cheetah plugin also
provides a TortoiseSVN-like interface that displays Git functions
directly on the context menu.
The following is available as a separate download from the same page...
msysGit is a build environment that includes all the tools necessary for developers who want to contribute by writing code for Git for Windows.
Git BASH delivers a familiar environment for Linux experts who occasionally need to use a Windows machine -- even if they don't need git itself. It starts with the BASH prompt and adds a collection of core utility programs such as ssh, find, grep, vi, awk, and of course git.
Related
To be able to run the test scripts for my cross-platform application also on Windows, I installed MSYS2 and used pacman to install any packages my test scripts rely on.
Since MSYS2 provides a port of git (msys/git), I think there is no need to install Git for Windows as well. But what are the differences between the git version provided in the MSYS2 repository and the one provided by Git for Windows?
I noticed these differences so far:
msys/git will fail when running pip freeze on a virtualenv where a Python package from a git clone is installed in develop mode:
FileNotFoundError: [WinError 3] The system cannot find the path specified: '/c/users/user/documents/project/.git\\..'
git-for-windows/mingw-w64-x86_64-git doesn't fail, so there are at least some differences with respect to path handling.
Git for Windows's gitk and git gui work out of the box. There's no need to set the GIT_GUI_LIB_DIR environment variable as described here.
It seems git from the Git for Windows repository offers the best experience at this point.
P.S. You can install Git for Windows's git in MSYS2 by adding the following to /etc/pacman.conf, above the [mingw32], [mingw64] and [msys] entries. But it might be a better idea to install the Git for Windows SDK instead, which is basically a special edition of MSYS2 including Git for Windows. Otherwise, the procedure below (and more) is also described here.
[git-for-windows]
Server = https://dl.bintray.com/$repo/pacman/$arch
[git-for-windows-mingw32]
Server = https://dl.bintray.com/git-for-windows/pacman/i686
After this (and perhaps a pacman -Sy), you can install the Git for Windows's git:
pacman -S mingw-w64-x86_64-git
I suppose there's no reason not to install Git for Windows's git in MSYS2?
EDIT The Git for Windows (un)installer left behind C:\ProgramData\Git\config. This points git at the wrong location for the SSL certificates. You can remove C:\ProgramData\Git\config to fix this.
msys/git is linked against a dynamic library provided by MSYS2 to provide POSIX-to-Windows compatibility (POSIX emulation) in a manner similar to how cygwin does (MSYS2 is forked from cygwin), thus it requires the MSYS2 environment to be present to run.
git-for-windows/mingw-w64-x86_64-git on the other hand, is compiled using the MinGW compiler, which performs the translation to native Windows calls at compile time, which results in a much faster binary compared to the emulation approach, and does only require native Windows libraries to run.
From The difference between MSYS2 and MinGW:
The POSIX emulation layer of MSYS2 binaries is convenient, but comes at a cost: Typically, MSYS2 programs are noticably slower than their MinGW counterparts (if there are such counterparts). As a consequence, the Git for Windows project tries to provide as many components as possible as MinGW binaries.
See also: How does MSYS2 differ from Cygwin?
git-for-windows/git issue 2688 adds a more recent (2020) perspective, from the maintainer of Git for Windows Johannes Schindelin:
The purpose of Git for Windows is really to bring Git to Windows.
While that implies that we have to ship quite a few Unix-like tools, it does not mean that we will include such tools unless they are needed for Git's own operations, or at least for historical reasons (needs of active contributors are sometimes a factor in deciding whether to include a tool or not).
Having said that, what you really are looking for is MSYS2.
Git for Windows leverages MSYS2 and ships with a subset of its files. MSYS2 even sports a package management system called "pacman" to install more tools (including Git...).
The documentation is "Install inside MSYS2 proper" as noted in the question, but it has recently changed, since Pacboy is removed from the base installation.
So it needs to be added back with:
# pacman -Fy
:: Synchronizing package databases...
[...]
# pacman -F pacboy.exe
# pacman -F pacboy
msys/pactoys-git r2.07ca37f-1 (base base-devel)
usr/bin/pacboy
usr/share/bash-completion/completions/pacboy
Then:
Copying /var/lib/pacman/local files over from my msys2 installation into git-bash's, I was able to install tmux (as I planned/showed in OP), and it is working fine for me.
So, having /var/lib/pacman/local files is all it take for msys2 and pacman to work within git-bash (I meant git-for-windows).
To add to this, Git 2.40 (Q1 2023) explicitly removes support for MSys, which now lags way behind MSys2.
See commit 2987407, commit c0b5045 (02 Feb 2023) by Harshil-Jani (Harshil-Jani).
(Merged by Junio C Hamano -- gitster -- in commit 4158b92, 09 Feb 2023)
mingw: remove msysGit/MSYS1 support
Signed-off-by: Harshil-Jani
Acked-by: Johannes Schindelin
MSys has long fallen behind MSYS2 in features like Unicode or x86_64 support or even security bug fixes, and is therefore no longer used by anyone in the Git developer community.
The Git for Windows project itself started switching from MSys to MSYS2 early in 2015, i.e.
about eight years ago.
Let's drop supporting MSys as a development platform.
Building with MSys is no longer supported
On my Windows 8.1 PCs I have VS 2013, which has its own Git stuff baked into it. Per the "suggestion" made by the VS IDE, I installed the Git command line tools (the full Git package). This got me version 1.8.3.msysgit.0. Then I installed GitHub for Windows, which installs its own "local" version of Git (on my PC it's version 1.8.4.msysgit.0).
So now I effectively have 3 different versions of Git on my PC:
The equivalent version baked into VS 2013 (if I ask it to perform Git operations for me)
The 1.8.3 version I manually installed, with nifty Whindows shell integration so I can click on a file or folder in a repo and bring up git gui or git bash for that repo.
The 1.8.4 version baked into GitHub for Windows
And, I would assume that these Git versions will change over time as I install updates to these tools.
My question is: As I use these three different tools to fiddle with my repo, am I at risk of them not agreeing on the repo internal structure?
I just can't wrap my brain around the fact that my Windows box doesn't have a unique, single installation of Git that all three tools use. Rather, each tool has its own concept of the Git version, but I'm using all three tools on the same repository.
As I use these three different tools to fiddle with my repo, am I at risk of them not
agreeing on the repo internal structure?
No. The main internal structure (pack format) won't change so much it would become incompatible with older git 1.8 versions.
And you can have as many different version of Git on your computer: they are portable archives, that you can unzip anywhere.
The only limitation is in term of feature (like for instance, pushing to shallow repo, which is only possible since git 1.9.0)
I have Windows 8.1 on my laptop and I've installed Git. If I type git --version in Windows' command prompt, the result is git version 1.8.5.2.msysgit.0. I can commit and update all the stuff on the server, everything works fine.
At the same time, I'd like to have a GUI for that so I've installed GitHub for Windows. Unfortunately, it does not let me commit my changes as it report that there is an error as suggests opening a shell (also console-like, but looks different from usual Windows' cmd). If I type in that shell git --version I get git version 1.8.4.msysgit.0 so apparently the GUI app uses an older version of git than the one I need, although I have a needed version of Git installed on my computer.
I appreciate any hints on how to make the GUI app to use the new version of git. If any details are still needed, please tell me - I'll provide them asap. Thanks
You will find the git (embedded in G4W -- GitHub for Windows as SLaks mentions) in
%LOCALAPPDATA%\GitHub\Portable_Git_xxxxx\
(See "Can the credentials stored in Github for Windows be shared with the whole operating system?")
You can try and replace that folder by a portable Git, PortableGit-1.8.5.2-preview20131230.7z: once uncompressed, you can rename the folder with the same name 'Portable_Git_xxxxx' and see if that works.
I like TortoiseSVN's Windows integration. Is there something like that for dealing with git-svn? I'd even go with a less integrated GUI if it is quick enough to access. What I don't want is a CLI as I rarely would have a command prompt sitting in the correct directory.
This is a related question but for Linux
TortoiseGit (https://tortoisegit.org/) added basic support for git-svn in release 0.8.1.0:
The release log says:
Add Basic Git-SVN Operation:
Add SVN DCommit Command
Add "SVN Rebase" and "SVN DCommit"
command at shell contextmenu
Support Git svn-clone at clone
dialog.
Have a look at TortoiseGit which is a TortoiseSVN clone for Git.
The easiest way I found was to use the git gui, and add a git svn dcommit and git svn rebase command to the Tools menu.
If you install msysGit, it will even put a 'Git GUI here' command in your context menu.
This has the advantage of not requiring any additional software apart from git itself, and will work on every platform that git (gui) runs on.
Edit: I should mention that this is exactly the way I have been productively using git against our svn-repos for a few months now. Works just fine. And it's the same on Windows, Linux, whatever. So no need to use different tools for the same job, depending on the OS.
Try SmartGit , it has almost all the functions console has and it has great GUI. http://www.syntevo.com/index.html
A sideways and very late answer, but maybe useful to later spectators, re why you don't want a CLI; assuming you're using XP install the Microsoft Command Prompt Here Powertoy which gives you an Explorer right-click shortcut on a folder. I use it all the time.
Windows 7 has the feature out of the box, but you have to hold down some key while you right click, I think.. shift or alt or something.
Also, Tortoisegit now apparently has git-svn features, I am going to check them out..
The best GUI tool for for using git local and svn as a server is SmartGitHg from syntevo (works for Windows, Lunux and OS X). For OS X you cal also use SourceTree from Atlassian. Windows Version of SourceTree doesn't support SVN.
You can use TortoiseSVN itself. That's what I do.
One may use any Git client while using the server-side Git-SVN synchronization setup. Have a look at SubGit to achieve that.
One has to install SubGit into Subversion repository:
$ subgit configure $SVN_REPOS
# Adjust $SVN_REPOS/conf/subgit.conf to specify your branches and tags
# Adjust $SVN_REPOS/conf/authors.txt to specify git & svn authors mapping
$ subgit install $SVN_REPOS
...
$ INSTALLATION SUCCESSFUL
SubGit converts Subversion repository into Git (it works in opposite direction as well) and installs SVN and Git hooks. These hooks are triggered by svn commit and git push as result all incoming modifications are instantly replicated to Git or SVN correspondingly. For more details please refer to SubGit documentation and git-svn comparison.
Starting from version 2.0 (not yet released at the moment of posting) SubGit allows to synchronized Subversion and Git repositories located on different hosts.
SubGit is a commercial tool. It is free for open-source, academic and small projects (up to 10 committers).
Full disclosure: I'm one of SubGit developers.
I have not seen best tool in past related to SVN like gui, but Git has now made something very useful and easy try Git Desktop for windows:
https://desktop.github.com/
I'm on a vista laptop, trying out git for the first time.
I installed the msysgit version, and it installed a "git bash" shortcut on the desktop. When I run it, it seems to run in a cygwin kind of box, where C:\ is /c/
Is it safe to use git from the windows command line where /c/ is C:\? does that create any conflict with the way git expects the pathes to be like?
What about, if I init from the bash/cygwin console, then commit from the windows console? Does that create any trouble?
Note: Keep in mind that git does not track where the repository is at -- just references. In other words you can cleanly move an entire git directory (.git + working tree) and it still works fine.
It should work in either case assuming your environment variables allow you to run git from the windows command line.
Both point to the same actual directories (although referenced differently), and use the same executable to modify the repository.
When you install MSYS Git, it will give you 3 options related to system paths. Which one you choose will determine how you can use it. It sounds like you want the 3rd option, "Run Git and included tools from the windows command prompt". This will put all of the git-related binaries in the system path, allowing you to use git from a normal command prompt. Be aware that it also overrides a few built-in windows tools, as the warning in the installer says.
After installing msysgit, you should be able to right click on an empty folder and see options "Git GUI here" and "Git BASH here". If you click Git GUI here it will open a GUI. Have fun!