Replies: 9 comments 2 replies
-
Good suggestion! Squash seems great, agreed with you that individual PR it is irrelevant. What about "rebase merging" ? Not sure for are the pros / cons for doing this. |
Beta Was this translation helpful? Give feedback.
-
In fact "rebase" should always be used before doing a PR to have a more clean code base ... But even with a Rebase you would get e.g. 20 commits when you "merge" it ... and also have that whole history in the main repo which might be "try and error stuff" or whatever ;-) So I would go with Squash only. |
Beta Was this translation helpful? Give feedback.
-
Ok! I turned off "rebase" as well then |
Beta Was this translation helpful? Give feedback.
-
Hmmm... "squash" seems to create problems when merging upcoming changes: I now have a bunch of nonsense conflicts that should have merged automatically. I think the history of local commits for an individual PR is required to be able to merge correctly. For instance, if I solved a merge conflict in one PR, this resolution will be used for all other PRs built on top of that PR so I won't have to resolve over and over the same conflict... I suggest to revert back to "Merge" mode. Here is the specific issue I have right now:
Have constant merge issues will be a problem for collaboration... |
Beta Was this translation helpful? Give feedback.
-
PS: I thought again and yes the reason for your issues was your "chained branches). In fact what you had was the following:
This means that also the normal merge strategies like fast forwards or whatever - that works if "time-abstraction" would have been newly branched from main - do not work and so it is a mess. In fact: If you want to do chained branches then merge is the only way that might work ... or we could try if rebases could solve that |
Beta Was this translation helpful? Give feedback.
-
Ok, I try to avoid chained branches because of all the issues in merging and transparency, but if it is your style to work then we need normal merges too ... Squash is for the easy cases maybe the best (still). I think it is more about favour and dev-process, so if you have the need for chained branches then allow it. It's easy (and also fine for me) :-)) |
Beta Was this translation helpful? Give feedback.
-
Sounds good! Note: I would recommend that you try once a branch chain. It is quite powerful for parallel and not be dependent of the speed of the PR reviews. But yes, a few times I completely screw up one branch with bad merging operations |
Beta Was this translation helpful? Give feedback.
-
;-) I did tried such constructs in the past if really needed, but it really needs tohat you know what you are doing ... 99% till now in open source area I was working alone on a project at a certain timepoint because it are "my projects" or I took something over or maintain a project where I have all relevant rights :-) IN the other cases most of the time one branch for the PR was more than sufficient, so the "blocked from other topics" was not happening that often. And most of the time I have noone to review, so I would only block myself ;-) When contributing to "projects from someone else" I personally see chaned branches risky because you never know what you get as review feedback (see my two PRs already for the cluster update ;-) ) ... and in fact review feedback can render a branch to be changed completely or even killed ... so basing another branch on that could screw up the whole work ... |
Beta Was this translation helpful? Give feedback.
-
Intermediate branches in the chain chain changed completely: yeah, it happens but not that often in my experience. |
Beta Was this translation helpful? Give feedback.
-
@mfucci Whats your opinion about merges of PRs? My experience in other projects is that PRs can include very "many commits" partially and using a normal "Merge commit" when merging the PR ends up in the single commits spread all over the timeline and afterwards hard to identify potentially problematic stuff introduced by a single PR.
In such projects we decided to only use "Squash" method on PR level. This combines anything for that PR and makes it one big commit - yes ou loose "history", but because it is just the history of that PR it mostly is irrelevant.
What do you think?
If we go for Squash we should disable the other options in the Repo settings
Beta Was this translation helpful? Give feedback.
All reactions