3 ms·
Personal opinion here, but I much prefer merge commits as opposed to fast forwarded commits. With a merge commit, there's one commit to revoke if something brea
by falcolas 12y ago
Personal opinion here, but I much prefer merge commits as opposed to fast forwarded commits. With a merge commit, there's one commit to revoke if something breaks, and there's one commit per PR to step through with git bisect, and more importantly it maintains history, which to my eyes is more useful than a "pretty" repository.
Drafting comments... if you want to draft comments, can't you do that in a separate editor? Better than relying on the browser as an editor.
I agree, though, the public repository requirement for making a PR is a bit awkward.
- scrollaway 12y ago> which to my eyes is more useful than a "pretty" repository. A pretty history is extremely important when you need to attract new contributors to your repository. I've maintained extremely clean git logs and extremely nasty ones too. New contributors are immediately turned off in the latter case, because a good developer will generally git log extremely early when discovering a new project.
- rdtsc 12y agoIt is a false dichotomy. You can have a dirty repository history with fast forward merges as well. And you can have a clean repository history with explicit merges. As I wrote in a sibling comment, feature branch commits should be rebased to looks clean and meaningful (squashed in some cases if needed) but then merged into main/master branch using --no-ff flag in order to generate a merge commit.
- Mithaldu 12y agoHere's my specific issue with that: Even in such a merge it would be possible for someone to hide a change in the merge commit, and due to the nature of git it is quite difficult to figure out with confidence whether a merge commit contains additional changes or not. I much prefer the rebase/merge no ff approach over the common "just merge whatever the fuck whenever", but due to the possibility of hidden details in merge commits, i prefer a linear history.
- hueving 12y agoWho is doing the merge commit? In every project I've contributed to, that's the automatic part by the code review system. If you can't trust that, then you are screwed in any workflow. If you're talking about merges into an outstanding pull request, then that's a non-issue because any changes will still show up in the diff against the target branch/repo.
- joelthelion 12y agoIt's extremely important if you want to attract cretins who favor "git history prettiness" over code quality.
- geofft 12y agoThis is actually one of the things I miss about SVN: in addition to a record of the commit being generated on a branch, there's a record of the commit being accepted onto trunk, and when and why. Rust has an integration robot that does all the merges into master, that records who reviewed it, what the link to the PR (and the code review on that PR! it exists!) was, etc. It was a little weird as a complete newcomer not to see humans in the `git log --first-parent` view, but I really like it now, because if I want to know why some commit was merged the way it was, that discussion is recorded nicely. (The merge commit has the subject/body of the PR, which doesn't need to match the subject/body of any commit in the PR.) Compare with, like, the Linux kernel, where the best you can do is Google for LKML threads with the same subject line. There's even a convention of [PATCH 0/10] for summaries, but those summaries are nowhere to be seen in the git repository. https://github.com/rust-lang/rust/commits/master https://github.com/rust-lang/rust/commits/master
- forgottenpass 12y agoI much prefer merge commits as opposed to fast forwarded commits That's cool, but it's still constraining a flexible system away from someone else's preferences. I prefer "--no-ff" myself too, but think that's irrelevant.
- rdtsc 12y agoFor integration branches it is nice to have cleanly rebased changesets which are then merged with "--no-ff" option so it generates an explicit merge commit.
- xkarga00 12y agoOpinions do vary a lot. I am iterating over history logs quite a lot and IMHO nothing beats clean repositories. Again IMO merge commits have no reason of existence whatsoever.
- zak_mc_kracken 12y agoYou're leaving out the alternative, which is the important part. If you pull rebase, then that merge commit will be whatever the author of the commit decides it should be. If they currently have ten files open, the merge commit will be ten files, regardless of how connected these files are, which is a lot of noise. With a pull-rebase, when they are ready to commit, they will decide to break it down nicely in 2+3+3+2 files. The only person who should decide how to merge their files should be the person that modified these files, not git.