4

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.

Bob.at.Indigo.Health
  • 11,023
  • 13
  • 64
  • 111

1 Answers1

1

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)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Can you elaborate please? If a new version of Git adds some feature or makes some change to the repo structure, why would the older version of Git know how to deal with that? – Bob.at.Indigo.Health May 11 '14 at 16:23
  • 1
    @Bob.at.SBS that my point: new features only: no changes to the repo structure. – VonC May 11 '14 at 16:23
  • So what happens if GitHub for Windows, which does whatever it wants to under the covers, decides to use a new feature? Might that not mess up the Visual Studio IDE when it tries to decode the repo? – Bob.at.Indigo.Health May 11 '14 at 16:26
  • @Bob.at.SBS no, it won't: the repo itself will always be a classic git repo, perfectly readable by Visual Studio. – VonC May 11 '14 at 16:28
  • Looking at the "pack-format.txt" documentation you referenced in your answer, I see, for example, an update to "Version 2 pack-*.idx files". Wouldn't something break if one of my tools adopted that update and one of my tools had not yet adopted it? – Bob.at.Indigo.Health May 11 '14 at 16:30
  • 1
    @Bob.at.SBS no, version 2 (and 3) extend version 1, making older tools slower and less efficient if they don't understand version 2+. Note: Visual Studio Git plugin is based on libgit2 (http://libgit2.github.com/, http://www.hanselman.com/blog/GitSupportForVisualStudioGitTFSAndVSPutIntoContext.aspx), which understands Version 2 (http://stackoverflow.com/a/10467182/6309). – VonC May 11 '14 at 16:35