Am Dienstag, 2. Mai 2017 19:30:33 UTC+2 schrieb Michael Gersten: > > > On 2017-05-02, at 10:22 AM, m...@jump-ing.de <javascript:> wrote: > > Now I have a branch with 4700 commits on it, but zero merges. Diff melted > down to 3800 lines. That's something I can work with. > > Go home message: merges are evil! > > > A better take-home message should be about how to prevent this from > happening in the future. >
Preventing that is simple: don't merge. Or allow fast-forward merges, only. As soon as there are merges in a branch, one can no longer rebase it. What I don't understand, exactly, is "a branch with 4700 commits but zero > merges". I thought that merging was the goal here? > The goal is to do a simple rebase of this branch onto it's own. Like 'git rebase HEAD~1500'. As soon as this works, one can do interactive rebases, which allows to filter away the unwanted parts. And later rebasing wanted parts onto trunk (master), of course. <javascript:> I'm perfectly aware that some 80% of Git users merge often. Github offers pull requests as merges, only. Still merges get one into the mess described above if one wants to do something useful with the recorded history other than just staring at it. If you want to see a Git repo with zero merges for years and still a lot of collaborative development, see https://github.com/Traumflug/Teacup_Firmware Topic branches are rebased to latest trunk (branch 'experimental', in this case), then they get cherry-picked over, or trunk is rebased to the tip of the topic branch (which gives the same result either way). -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.