Git repository backwards compatibility

前端 未结 2 1910
离开以前
离开以前 2020-12-06 05:01

I just had a quick question about git - how backwards compatible are git repositories? Eg., I\'ve created a repository using git 1.6.4 and the svn2git ruby script, but I wan

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 05:40

    There were very few incompatibile changes in layout of git repository; incompatibile in the sense that older version could be not able to deal with repository created with newer version, or do an exchange (fetch or push) with newer server.

    You should check RelNotes (e.g. from here) to find if there was some incompatibile change between versions you use.

    Some (probably all) of those incompatibile changes are:

    • submodules support: git version before submodule support was introduced in git core will not be able to handle repository which uses submodules (it does not understand subtree/gitlink entries)
    • packed refs: old git version would not be able to fetch via HTTP from newer repository that uses packed refs (.git/packed-refs). Same with old git using the same repository as new git which has packed refs
    • offset delta packfiles: old git doesn't understand newer (more compact) version of git packfile (ofs-delta). This is not a problem for fetching and pushing, as there is discovery of features client supports by server.

    None of those were between 1.6.4 and 1.5.6, I think.

提交回复
热议问题