0

I moved a Git working copy from one host to another using tar:

tar cBpf - workingcopy | ssh targethost 'tar xvBpf -'

Now when I enter git pull on the new host I get

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.

This does not happen on my source system.

What could I have missed to copy or configure?

Biffen
  • 6,249
  • 6
  • 28
  • 36
Skeeve
  • 7,188
  • 2
  • 16
  • 26
  • 3
    This might help https://stackoverflow.com/questions/62653114/how-can-i-deal-with-this-git-warning-pulling-without-specifying-how-to-reconci Your new host git global config is missing for pull.rebase – Vishwanath May 11 '22 at 09:03

1 Answers1

2

My guess is that you're seeing this not because of the repository that you copied (or because of different configs, although that could also be the case).

But probably because of the git version being different between the systems.

This should be no problem when it comes to working with the repository.

It's just that the newer git version on the target system displays an additional hint, that encourages the user to set a specific option so that git knows how to handle non-fastforward pull situations (merge vs. rebase vs. abort)
The default behavior (when you don't set that config option) is the same as in the old version of git: merge

Jay
  • 3,640
  • 12
  • 17
  • 2
    It seems you're right. I found "This warning was added in Git 2.27." when reading the question linked by @Vishwanath above. 2.20 is on my source, 2.30 on my target. – Skeeve May 11 '22 at 11:32