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.

You are viewing a single thread.
View all comments View context
1 point

This. Git pull will never rebase unless told to do so.

permalink
report
parent
reply
1 point

I understand that. But we have to choose betweet --rebase, --no-rebase or --ff-only when git gets stuck.

permalink
report
parent
reply

Emacs

!emacs@communick.news

Create post

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

  • Windows
  • Mac OS X
  • GNU/Linux and BSD (Just get it from your distribution’s package manager)

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for “emacs” and “vi” link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

Community stats

  • 18

    Monthly active users

  • 562

    Posts

  • 2.4K

    Comments