6

What is the experience (good or bad) using Git for version control relating to how well different releases of Git work together?

To cut a short story long:

I am considering Git for some planned home projects, but due to my hodge-podge range of setups using default packages from repositories will mean being a full point release different. I plan to keep a master repository (which other people may be reading and branching from) on a server that runs Ubuntu 8.04 which means v1.5.x if I use the pakages from the standard repository (that may get upgraded to 10.04 in the coming months, which would mean the Git packages upgrading to 1.7.x), but my netbook runs the newer 9.10 which has Git v1.6.x. My main Windows machine I've not decided what to do with yet (as there is no package management to use it could either get any version directly, or I might use an Ubuntu VM for development).

As an extra complication, I'm likely to want to interact with a couple of projects currently on GitHub too (and perhaps drop some of my code there too as I intend for it to be open-source software).

I'm happy to compile up my own copies of what-ever version is best (i.e. the stable version closest what GitHub runs, presumably 1.7.x) if that is the only reliable way to proceed, but if I'm unlikely to experience problems pulling changes between 1.5/1.6/1.7 then I'd prefer to keep to the standard repository versions to make updates/upgrades of Git as painless as possible.

I've not found any reference to this after a few searches, which leads me to believe cross-version compatibility is good (if there were significant problems I'd expect there to be obvious mention in the release notes and to find posts in various places from people asking how to deal with issues).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
David Spillett
  • 1,401
  • 11
  • 21

4 Answers4

4

When it come to the repository format and layout, I believe the last change was from Git 1.4.3 to 1.5.0.

Jakub mentions here a few features that may be not supported depending on your Git version, but there shouldn't be any incompatibility issue in term of "older version which could not be able to deal with repository created with newer version".
Git 1.5.x, 1.6.x and 1.7.x should all manage the same repository without any problems.

Update 2017: I confirm a git repo 2.x still works with a git repo 1.7

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Jakub's post does mention a couple actual repository incompatibilities, I think, but they've all been in git a long time (from a little git-describing, packed refs v1.4.4, submodules 1.5.3). – Cascabel Apr 20 '10 at 16:31
  • Thanks, this is reassuring confirmation. – David Spillett Apr 21 '10 at 13:28
  • Can anyone update this regarding more recent releases to say Git 2.11.x? I'm planning to upgrade our group from 1.7.2 to 2.11.1. I cloned our git server repo (running 1.7.2) and am looking at it with a git 2.12.2 client and there are no obvious problems so far, but have only run git status. – Generic Ratzlaugh May 09 '17 at 19:57
  • @user1161147 I have updated the answer and have done the same kind of git repo management with that kind of delta. – VonC May 09 '17 at 21:16
3

Yep, can confirm version compatibility between 1.5.x and 1.6.x so far. Once, I had problems undoing some actions with git 1.4.x because not all commands from the newer git versions were available.

poseid
  • 6,986
  • 10
  • 48
  • 78
1

A 1.7 client might have problems with a 1.5 server though, if the server has the older default contents for the "description"-file:

Unnamed repository; edit this file to name it for gitweb.

1.7 does not accept the above contents.

kaleissin
  • 1,245
  • 13
  • 19
1

Yes they will all work fine together.

Bryan Drewery
  • 2,569
  • 19
  • 13
  • 2023 and it seems this is not easy anymore. I'm stuck in dependency hell with git client vs server versions again. I don't seem to be able to find any version that keeps Windows 10, RHEL6 & RHEL7 happy. – teknopaul Feb 08 '23 at 00:32
  • Here in June 2023, RHEL 6 is currently "out of support", RHEL 7 will be in 1 year, so perhaps you can compile GIT from source on RHEL 6 and 7, and continue using whatever version of GIT you can on Windows 10. – FormerAtariUser Jun 13 '23 at 17:22