Git版本兼容性
使用 Git 进行版本控制(与不同版本的 Git 协同工作的效果如何)有关的体验(好还是坏)是什么?
长话短说:
我正在考虑将 Git 用于一些计划中的家庭项目,但由于我使用存储库中的默认包的大杂烩设置将意味着完全不同的版本。我计划在运行 Ubuntu 8.04 的服务器上保留一个主存储库(其他人可能会从中读取和分支),这意味着如果我使用标准存储库中的包(可能会升级到 10.04),则版本为 v1.5.x未来几个月,这意味着 Git 软件包升级到 1.7.x),但我的上网本运行的是较新的 9.10,其中包含 Git v1.6.x。我的主要 Windows 机器我还没有决定如何使用(因为没有包管理可以使用它,它可以直接获取任何版本,或者我可能使用 Ubuntu VM 进行开发)。
更复杂的是,我可能还想与 GitHub 上当前的几个项目进行交互(也许也将我的一些代码放在那里,因为我打算将其作为开源软件)。
我很乐意编译我自己的最佳版本的副本(即最接近 GitHub 运行的稳定版本,大概是 1.7.x),如果这是唯一可靠的方法,但如果我不太可能遇到这种情况如果在 1.5/1.6/1.7 之间进行更改时出现问题,那么我宁愿保留标准存储库版本,以使 Git 的更新/升级尽可能轻松。
经过几次搜索后,我没有找到任何对此的引用,这使我相信跨版本兼容性很好(如果存在重大问题,我希望在发行说明中明显提及,并在各种版本中找到帖子人们询问如何处理问题的地方)。
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).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
当谈到存储库格式和布局时,我相信最后的更改来自 Git 1.4.3 到 1.5.0。
Jakub 在此提到一些可能不受支持的功能,具体取决于您的 Git 版本,但在“旧版本无法处理用新版本创建的存储库”方面不应该存在任何不兼容问题。
Git 1.5.x、1.6.x 和 1.7.x 应该可以毫无问题地管理同一个存储库。
2017 年更新:我确认 git repo 2.x 仍然可以与 git repo 1.7 一起使用
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
是的,到目前为止可以确认 1.5.x 和 1.6.x 之间的版本兼容性。
有一次,我在使用 git 1.4.x 撤消某些操作时遇到了问题,因为并非较新 git 版本中的所有命令都可用。
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.
是的,他们都会一起工作得很好。
Yes they will all work fine together.
但是,如果服务器具有较旧的“描述”文件默认内容,则 1.7 客户端可能会在使用 1.5 服务器时出现问题:
1.7 不接受上述内容。
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:
1.7 does not accept the above contents.