different versions of git between developers

独自空忆成欢 提交于 2019-12-30 06:44:31

问题


if I have installed version of GIT 1.9.4 and the repository on server is using 1.8.2 would there be a problem? Are there any issues with working using different versions of GIT? Does every person in a team should have the same version or does it not matter?

Could find any info on that in docs, I'd be grateful for your help.


回答1:


1.9.4 and 1.8.2 are pretty close, but there may have a few problems between different git versions, mainly varying behaviors.

If you want to know what have changed, you can check git repository (https://github.com/git/git).
Clone it locally, and search for "compatibility" in the Documentation/RelNotes directory (you can target 1.8 and 1.9 versions):

git clone git@github.com:git/git.git
grep "compatibility" Documentation/RelNotes/1.[89]* -n

Documentation/RelNotes/1.8.0.txt:4:Backward compatibility notes
Documentation/RelNotes/1.8.1.txt:4:Backward compatibility notes
Documentation/RelNotes/1.8.2.txt:4:Backward compatibility notes (this release)
Documentation/RelNotes/1.8.2.txt:25:Backward compatibility notes (for Git 2.0)
Documentation/RelNotes/1.8.3.txt:4:Backward compatibility notes (for Git 2.0)
Documentation/RelNotes/1.8.4.txt:4:Backward compatibility notes (for Git 2.0)
Documentation/RelNotes/1.8.5.txt:4:Backward compatibility notes (for Git 2.0)
Documentation/RelNotes/1.9.0.txt:4:Backward compatibility notes
Documentation/RelNotes/1.9.0.txt:30:Backward compatibility notes (for Git 2.0.0)

You're only concerned by 1.8.3+ releases, and you can see most of compatibility issues concern Git 2.0. The only one line that is interesting is this one:

Documentation/RelNotes/1.9.0.txt:4:Backward compatibility notes

It you take a look to 1.9.0.txt, you'll see:

  • git submodules foreach $cmd $args behavior has been enhanced
  • loose-object format has been dropped
  • git fetch --tags behavior has changed
  • git push $there $what has been enhanced
  • repo-config, tar-tree, lost-found, and peek-remote have been dropped

Nothing alarming but git fetch --tags changes, you shouldn't have any compatibility problem. Anyway, read carefully the full text:

Backward compatibility notes

"git submodule foreach $cmd $args" used to treat "$cmd $args" the same way "ssh" did, concatenating them into a single string and letting the shell unquote. Careless users who forget to sufficiently quote $args get their argument split at $IFS whitespaces by the shell, and got unexpected results due to this. Starting from this release, the command line is passed directly to the shell, if it has an argument.

Read-only support for experimental loose-object format, in which users could optionally choose to write their loose objects for a short while between v1.4.3 and v1.5.3 era, has been dropped.

The meanings of the "--tags" option to "git fetch" has changed; the command fetches tags in addition to what is fetched by the same command line without the option.

The way "git push $there $what" interprets the $what part given on the command line, when it does not have a colon that explicitly tells us what ref at the $there repository is to be updated, has been enhanced.

A handful of ancient commands that have long been deprecated are finally gone (repo-config, tar-tree, lost-found, and peek-remote).



来源:https://stackoverflow.com/questions/26884027/different-versions-of-git-between-developers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!