+1

Hide warning about rebasing a merge commit

Mikhail Matrosov 6 years ago 0

I really like how SmartGit is smart when doing pulls. If you say it to
merge, it will merge, if you say it to rebase, it will rebase. If
there are merge commits to be rebased, it will ask you about whether
you are going to preserve them. In a pretty annoying manner... It will
show this dialog box "rebasing a merge commit might easily cause
troubles, how about merge instead?".

But there are a number of problems with this dialog:
1. It does not say much. "Can cause troubles"? Huh? If I did not know
how it works, it wouldn't tell me much. Currently I know of only one
"trouble": if I have resolved conflicts in the merge I am about to
rebase, I would need to repeat it. Tell me this. Anything else? Tell
me either.
2. There is no way to select a default behavior. When I pull, I have
this nice little dialog, where I can select a default behavior: pull
or rebase. Why I cannot clarify rebase behavior in the same dialog?
Like rebase with preserve by default.

I use this feature very often in our workflow:

  1. Create a dev branch. Develop it for some time.
  2. Fetch. Checkout master. Merge dev into it.
  3. Build and run tests.
  4. Push to master. Discover there are new commits in master.
  5. Pull master.
  6. Push again.

On step #5 I don't want to pull with merge, because it will mess up my first parent path. But pulling with rebase, I want to preserve the merge to make it clear dev branch was merged. I am only rebasing this one merge commit. I never got into troubles with this approach.