Git 工作副本移至另一台主机的问题

Issues with Git Working Copy moved to another host

我使用 tar:

将 Git 工作副本从一台主机移动到另一台主机
tar cBpf - workingcopy | ssh targethost 'tar xvBpf -'

现在,当我在新主机上输入 git pull 时,我得到

hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.

我的源系统上没有发生这种情况。

我可能错过了复制或配置什么?

我猜你看到这个 而不是 因为你复制了存储库(或者因为不同的配置,尽管也可能是这种情况)。

但可能是因为 git 版本在系统之间不同。

在使用存储库时,这应该没有问题。

只是目标系统上较新的 git 版本显示了一个额外的提示,鼓励用户设置特定选项,以便 git 知道如何处理 non-fastforward拉动情况(合并与变基与中止)
默认行为(当您未设置该配置选项时)与 git 的旧版本相同:merge