this post was submitted on 23 Oct 2023
1 points (100.0% liked)

Emacs

310 readers
1 users here now

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

Get Emacs

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

founded 1 year ago
MODERATORS
 

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 comment's thread
view the rest of the comments
[–] jangid@alien.top 1 points 11 months ago (1 children)

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.

[–] WallyMetropolis@alien.top 1 points 11 months ago

That I cannot answer. Never used that flag. Maybe try grepping the magit package.