1 |
On 07/04/2015 08:17 PM, C Bergström wrote: |
2 |
> I realize that this is subject to lots of different opinions and that |
3 |
> my input doesn't carry much weight - At least I thought it's a topic |
4 |
> that should be brought up (again?) |
5 |
> --------- |
6 |
> To start.... I hate git.. I have used it for years now and the |
7 |
> multitude of ways that are possible to accomplish nearly the same |
8 |
> thing are *annoying* at best.. With that rant out of the way on to the |
9 |
> point.. |
10 |
> --------- |
11 |
> I super don't like "merge" workflows. |
12 |
> 1) "merge commits" are confusing at best and normal tools don't |
13 |
> display and work with them as you'd always expect |
14 |
> |
15 |
> 2) merge commits lead to multiple parents, which breaks a clean and |
16 |
> simple to follow linear history |
17 |
> --------- |
18 |
> |
19 |
> What I personally prefer is a rebase workflow. |
20 |
> The downsides |
21 |
> 1) Requires to you rebase before pushing. Which can be slightly more |
22 |
> work than just a lazy resolution of the conflicting "merge commit" |
23 |
> (depending on if you flatten your commits) |
24 |
> |
25 |
> 2) May not be the most popular git work-flow. |
26 |
> |
27 |
> 3) Due to #2 from above - may have detractors and or less people who |
28 |
> are familiar with it. |
29 |
> -------------- |
30 |
> I'm of the mindset that if you're going to keep something under |
31 |
> revision - the history should be clear and clean. Linear is the only |
32 |
> way to fly for that. For those using cvs or svn - that's what they'll |
33 |
> be familiar with and probably expect to find in a git log. You can |
34 |
> start with forcing rebase and keep a clean history - if one day it |
35 |
> proves too problematic you can switch over to "merging" - the other |
36 |
> way isn't really possible to do cleanly, depending on your tools.. |
37 |
> |
38 |
> Thanks for the minute |
39 |
> |
40 |
|
41 |
Forcing a rebase-only workflow on developers will increase the amount of |
42 |
bad commits. Because non-trivial conflicts in rebases are difficult to |
43 |
resolve, since you fix conflicts for _every_ commit separately. |
44 |
|
45 |
Additionally, it will also mess up user-branches with user gpg |
46 |
signatures and will hide development information that can be useful. It |
47 |
also complicates working on concurrent branches, a lot (mass |
48 |
cherry-picking is bad, rebasing on already pushed commits is bad too). |
49 |
|
50 |
Whether people use merges or rebases is totally orthogonal to the topic |
51 |
of a "clean git history". It only matters _how_ people use both methods. |
52 |
|
53 |
I'd even say it would achieve the opposite of what you want, at least |
54 |
for a project as large as the gentoo tree. If you have a small project |
55 |
with only one master branch and a very strict review policy, then a |
56 |
rebase-only workflow might work. |
57 |
|
58 |
That said, I don't think this discussion is particularly useful. There's |
59 |
no gain and no strong logical reason (except some personal aesthetical |
60 |
preference) to enforce a rebase-only workflow. |