2

有人知道,如果 windows 和 linux 版本兼容?

我需要知道,因为我需要在 linux 和 win 之间共享我的本地存储库所在的磁盘,该磁盘在 linux pc 上的 virtualBox 中运行。

我在 linux 上开发,但是当我远程工作时我需要在 windows 上使用 git(因为 VPN 问题)。另一种选择是始终使用 Windows 中的 git,但我不喜欢启动 vbox。

有人做过吗?我想这可能有点冒险,或者依赖这些版本 100% 兼容是否可以。我不想让我的存储库损坏...

干杯亨宁

4

1 回答 1

1

Yes, as long as you're concerned about the database format they are compatible. Moreover, such compatibility is required even for "non-native" solutions like the JGit or libgit2 libraries.

I can only see two possible problems:

  • From time to time Git might change behaviour in a way not compatible with some of its past versions (but very rarely and with bold warnings in release notes documents long before the change is made).

    So find out what versions you're running (git --version) in both worlds and if there's a major difference between them (in the X number of 1.X.Y version) consider reading the changelog for the one which has a greater X for possible gotchas.

  • Potential filesystem issues: these days you can mount an NTFS volume R/W when running a recent Linux kernel, and same goes about Ext2 (but not Ext3 and certainly not Ext4) on Windows but you might, in theory, accidently hit some problem with these drivers — of course, they haven't received that much love their native variants have.

于 2013-10-15T16:26:04.530 回答