4 ms·
I always checkout the branch I am merging something into. I was vaguely aware I could have main checked out but merge foo into bar but have never once done that
by IgorPartola 7mo ago
I always checkout the branch I am merging something into. I was vaguely aware I could have main checked out but merge foo into bar but have never once done that.
- Sharlin 7mo agogit checkout mybranch git rebase main A conflict happens. Now "ours" is main and "theirs" is mybranch, even though from your perspective you're still on mybranch. Git isn't, however.
- IgorPartola 7mo agoAh that’s fair. This is why I would do a `git merge main` instead of a rebase here.
- ljm 7mo agoI have met more than one person who would doggedly tolerate rebase, not even using rerere, instead of doing a simple ‘git merge --no-ff’ to one-shot it, not understanding that rebase touches every commit in the diff between main and not simply the latest change on HEAD. Not a problem if you are a purist on linear history.
- em-bee 7mo agonot understanding that rebase touches every commit in the diff it sounds like that's a problem for you. why would that be? i prefer rebase and fast forward, but i am fully aware that rebase rewrites all commits.