-1

For years I have been working on a project along with my colleagues following this pattern.

git checkout dev
git pull
git checkout -b my-branch
git add .
git commit -m "cool new changes"
git pull origin dev
git add .
git commit -m "more cool things"
git push

and so on. Never have I had an issue. Now suddenly I am constantly faced with this message

hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: 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.

Did git recently update something to force this? Did my config get corrupted? What I want is for it to do whatever it always did, which I'm pretty sure was just an auto-merge. I can't stand rebase as it makes me go through 100s of conflicts that don't actually exist.

radop33392
  • 123
  • 7
  • You have been working for years without getting a merge conflict git can't automerge? Anyway - that's what it's saying. there's something remote that won't automerge with what you have locally and you have to manage it manually. Nothing new, nothing strange - just the way it works. – fredrik Aug 08 '23 at 15:39
  • @fredrik It's not a merge conflict. It's just a lack of any specification in the config as to what "pull" means. Of course if the OP would just stop saying "pull" the problem would have been solved; it is bad, for exactly this reason. – matt Aug 08 '23 at 18:44

1 Answers1

-1

The answer was to run

git config pull.rebase false --global

Something must have changed recently with github (new version) that unset or requires this to be set again.

radop33392
  • 123
  • 7