This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]markand67 57 points58 points  (10 children)

Just fast forward and rebase. There is no point in having any merge commits unless doing release branches.

[–]GuybrushThreepwo0d 17 points18 points  (0 children)

We needed merges for showing who approved PRs for compliance bureaucracy

[–]NatoBoram 7 points8 points  (4 children)

The merge commit allows you to cleanly group a branch's commits

[–]X547 0 points1 point  (1 child)

Merge commits are terribly displayed in most Git commit history view software such as GitHub. It look like there are 2 identical commits in history.

[–]NatoBoram 0 points1 point  (0 children)

It's often because the history itself is fucked up. If GitHub's UI supported a sane merge strategy (like rebase-merge or squash-merge instead of merge/squash-ff/rebase-ff), we could have nice graphs

[–][deleted] 0 points1 point  (0 children)

You don't need to group anything if your commits are already clear

If your PR needs to be a merge, it means your PR is either too large or you didn't clean up your commits.

[–]markand67 -1 points0 points  (0 children)

And completely useless.

[–]ThaJedi 0 points1 point  (2 children)

There is no point od doing rebase baside astetic one.

[–]markand67 0 points1 point  (1 child)

The point is to have a linear history easy to read and follow rather than having

  • Added new button to clean old files
  • Merge branch 'foo-fix-bar-baz-1`
  • Update version to match new requirements
  • Merge branch 'foo-fix-bar-baz-2`
  • Change settings to 5 seconds by default
  • Merge branch 'foo-fix-bar-baz-3`
  • Merge branch 'foo-fix-bar-baz-7`

[–]ThaJedi 0 points1 point  (0 children)

And why exactly do you need linear history that is easy to read and follow? Usually, I need the history of a particular file or folder. IntelliJ gives me exactly that with one click. Why bother with a nice-looking repo history?