If you mess up in conflict resolution mode and type "git commit --amend" (the one difference from edit mode), what happens? The patch you're resolving conflicts in gets magically merged into the patch below it. Two changes, tangled together. One commit message lost.
5
1
4
Is this a well known problem? Do other people hit this a lot? Is it a well known "be really careful not to do this, or you'll lose your work"? Because not losing work is one of the core values of version control. And I'm *this* close to switching back to hg.
11
1
5
(I should note that most of the time in an interactive rebase I type "git commit --amend --no-edit" because I know I don't want to edit the commit message; that also means I don't see the UI that might have given me a hint that stuff was going to go wrong.)
4
That doesn't work if you're developing a series of changes that are supposed to make sense separately.
1
I can explain with links to examples when I'm back at my computer
1
1
So both the layout and DOM teams at Mozilla have a strong culture of producing small patches where each step compiles. This makes code review of large changes much easier, and also is useful for bisection when debugging regressions. (Other teams too, but probably less strongly.)
1
1
A relatively simple example is hg.mozilla.org/integration/a… . This was easier to code review as four separate patches than one. (#4 depends on #3 and #1. #3 depends on #2.) With more complex changes, the value goes up.
1
So I might write a series of six patches (probably compiling each one) before doing any testing. Then I hit a test failure and realize it's a bug in patch #2. This is before posting anything for code review. So I want the fix merged into patch #2. rebase -i.
1
1
Replying to @davidbaron @sayrer
Note that patch #1 in that series is large-ish, but it's really simple to review because it's all trivial changes, all doing the same thing. If it were mixed into a bunch of other things it would be a lot harder to review than when separated out.

Aug 3, 2019 · 11:35 PM UTC

1
This tweet is unavailable
I guess I don't understand what "do this with merges" means. If I have a sequence of 4 patches where patch 2 depends on patch 1 (and would conflict if not on top of it), same for 3 depending on 2, etc., and I want to modify patch 1, what are you suggesting I merge?
1