When local repository moved ahead and remote also moved ahead, the remote doesn’t allow Push. You have to first Pull. But sometimes pull doesn’t work straight forward, you have to specify the merge strategy. This happens when `–ff-only` doesn’t work for some reason.
In such a scenario, I normally use `–no-rebase` option. It creates a new commit with the merge. I can use `–rebase` also. But that is my personal preference. I want to keep the history of changes as is.
I couldn’t find `–no-rebase` option in the Magit interface. Any idea, how to do that using Magit?
ChatGPT suggests that instead of direct Pull i.e. `F u`, I should first fetch and then merge i.e. `f u` followed by merging aka `m m`. Although, I haven’t tried it yet. But just wanted to ask, if there is a direct way to achieve `–no-rebase` in Pull.
I would also suggest fetch. Pull is fetch and merge. So if you don’t want to merge, you can just fetch.
You and chatgpt in unison…
That’s why I said ‘also.’
I am okay with this approach. I just wanted to make sure that I am not missing anything. Magit claims that it provides all the features that are normally available via CLI route. So I thought may be `git pull --no-rebase` is hidden somewhere in the user interface.
That I cannot answer. Never used that flag. Maybe try grepping the magit package.