Replies: 2 comments 8 replies
|
We can definitely change the workflow so that all of us work off forks instead of directly on the main repository. We did, however, yesterday discuss changing the pull request strategy to use squash merges (a direction that I find problematic). If we squash commits into a single commit, we lose the detailed history, and as the linked story demonstrates, this could make troubleshooting harder. As we discussed in yesterday's meeting, even if we squash a pull request into a single commit, we could still use the original branch for troubleshooting. If, however, we exclude pull-request branches to only originate from forks, we lose control with those branches, and thus lose control with the repository history. Since this is an open-source repository, it's conceivable that someone submits a pull request from a fork, then subsequently, mission accomplished, deletes the fork. I often do that myself. Using rebase instead of squash does address that problem, but then what's the point? Why not use proper merges, as Git was intended? To be clear, this is an incarnation of a discussion that I constantly run into. People wish to keep repositories 'clean', and it's not that I don't sympathise with that aspiration. The difference of opinion lies in how one defines 'clean'. I get the impression that people often associate cleanliness in code with some kind of aesthetics. After all, code bases have no germs or poisons to clean away, so the definition of 'clean' is a metaphor at best. To me, there's beauty in reality and truth. While I, too, aspire to keep the working state of a code base as simple and accessible as possible, I believe that the source-control history should capture what actually happened, and not be a summary. If several people worked on the code base in parallel, then that's the truth, and I don't consider a 'multi-track' Git history messy. So, if we were to keep using Git merges for pull requests, this wouldn't be an issue. Once branches are merged, they can be safely deleted. |
|
@ploeh Thanks! Valid points.
That I would really like to use as the basic workflow.
And their is a legitimate concern you raise and something I didn't realize. @dawedawe: sorry about this but is their a way to avoid the squash commits?
You convinced me. I agree.
With that I completely agree. My main concern is that there is a lot of trial and, thus, error, some of which may even by accident ends up in source code. And, taking a good look in the mirror, that is something that I did too much (in the past), particularly with regard to generating documentation, in hindsight. The need to use PRs is, hopefully, going to prevent at least my bad habits.
And that's what I precisely have been doing! |
Uh oh!
There was an error while loading. Please reload this page.
I would like to keep the main repository as clean as possible. For example, if you want to show some code but are not sure whether this should go in the main branch per pr, I would like to recommend to do this in your own fork and then refer to the branch in your fork, as that is what forks are for?
This is my opinion. So, feel free to push against this. But there should I think be some policy on how to deal with this.
All reactions