21 ms·
Your GitHub pull request workflow is slowing everyone down
- nottorp 3y agoThis is not only about pull requests. 900 line commits will bite you in the ass later no matter if you use PRs or not.
- krisoft 3y agoTo be honest I can't even decide if you consider 900 lines too small or too big.
- nottorp 3y agoCounting lines is useless. I try to commit the smallest "logical unit" (which is only fuzzily defined in my head) possible. If that's 2000 lines as in the case of changing an API signature across the whole application, so be it. Most of the time you can go much smaller than that though. Also, i believe you've never had to go through year old large commits to figure out why a change was made? :)
- krisoft 3y ago> i believe you've never had to go through year old large commits to figure out why a change was made? :) Frequently. Folks joke that I'm not a software engineer but a software archaeologist. As you say the line count doesn't make any difference. If the PR is doing one thing that is good. If it has a good description describing the why and linking additional tickets/documents that's even better.
- nottorp 3y agoBut then you'd have to agree that as a rule of thumb 900 lines is too big.
- krisoft 3y agoI can only quote myself: “the line count doesn't make any difference” Just to illustrate. Imagine thet you have a bug. You trace it back either via bisect or git blame to a particular commit. Which one would you prefer: - a 5 line commit with title “Bugfixes”. 3 of those lines is changing various parameters sligtly and 2 makes some code change which seemingly “should do the same”. The associated PR has no description, and no discussion. Just an approving comment saying “LGTM”. Both the author and the approver has since left the company. Vs - a 5000 line commit with the title “Add timeout parameter to frobnicator API”, and when you check the PR in the description they explain why they think the timeout has to be configurable and link to a bug report ticket, and a design document containing lively debate about the merits of alternative solutions. There is also a comment about the testing they have done to validate the change and plots from the trial run. (Let’s also say for fairness that everyone involved in the change has since departed in this case too.) Which one do you prefer? I for sure would prefer the second one. Yes it is much much longer, but it does “one thing”, and has ample information about the context it was created in and about the thinking which was going on in the heads at the time.
- nottorp 3y agoYou are mixing code length with documentation length. Also there’s a bit of process fetish there
- petepete 3y agoI wonder how much impact changes to package-lock.json, yarn.lock, Gemfile.lock and friends have on these PR sizes. Agree overall that most are too big but 900 is way more than I typically experience.
- arvinsim 3y agoIMO, number of commits is irrelevant since you can always squash them. LoC is the relevant metric.
- lima 3y agoGraphite is neat. If you want something lighter-weight, spr[1] is also worth taking a look at as an entirely client-side "solution" to PR stacking. Unfortunately, it is very hard to build good code review tooling on top of GitHub due to the severe impedance mismatch between the two models as well as GitHub API limitations and rate limits. That mismatch cannot be fully resolved (branches vs. patches) and results in constant friction, and you end up trusting a third party with full control over your repositories and approval workflows. Graphite is the best attempt I've seen so far, but it still doesn't come anywhere close to Gerrit[2], which simply uses plain Git commits. Every commit becomes a review, and stacking is accomplished by simply pushing multiple commits. No custom tooling required - just `git push`. It has very, very good code review UX and allows meaningful and in-depth back-and-forth during a code review, without losing context or having to re-review the entire diff. Once you're past the initial learning curve, it is blissful. Gerrit is open source and it's what Google uses for many of their public projects such as Chromium and Android, and it is quite easy to self-host. It is entirely built on JGit and even stores code reviews as Git commits alongside the repositories. If you want to give it a try - there's a well-maintained public instance, Gerrithub[3], operated by Gerritforge. Many open source projects use it. [1]: https://github.com/ejoffe/spr https://github.com/ejoffe/spr [2]: https://www.gerritcodereview.com/ https://www.gerritcodereview.com/ [3]: https://gerrithub.io https://gerrithub.io
- Zacharias030 3y agoShoutout to ezyang‘s ghstack as well! ghstack also adopts the one-PR-per-commit paradigm, which means you have to get comfortable with a lot of amending and interactive rebases and moving fixup commits around your stack. Amendments are nicely mapped to new commits in the PR though. Graphite really has nice support for that sort of stuff and opens PRs directly against master. I don’t really like that it needs an external service beyond just github and git, but oh well. The only thing I had problems with is that merging from github is very confusing and I don’t want to be forced to adopt their webinterface. I‘d prefer to merge/land my stacks from the CLI.
- Borealid 3y agoYou mentioned a lot of Gerrit features but you didn't mention two: - it stores review information as "git notes", so you can see in the repository itself with `git show` who reviewed which commit and what score it was given, even though it doesn't alter the commit hashes by editing the commit message - you can have arbitrarilty many different types of review, for example a QA test score that's separate from a code review score also separate from unit test scores. Much better than the all-builds-green other options offer Gerrit is the best code review tool I've ever used and I don't get why people copy Github instead of Gerrit.
- jFriedensreich 3y agoautomatic rebasing is nice but how does graphite/ et al. solve the issue of creating a rebase conflict when working in feedback in the middle of the stack? And big prs have usually the property that you cannot just incrementally merge parts to main without breaking main. An api producer might change at one place and the accompanied change for an api consumer changes in another. Splitting up prs so the parts can be merged is significant work and part of the reason why big prs happen in the first place. I dont see how this works without a "virtual" main branch target that only gets merged to real main when the whole merge is done but then you have to reconcile differences for things that happened on main in between.
- Zacharias030 3y agoAnything that rebases cleanly is rebased and anything else is marked for needing a manual resolution.
- creshal 3y agoThat looks a lot like the workflow the Linux kernel uses (with MRs broken up into individual logical patches), just re-invented on top of a proprietary tool to charge $30 for it?
- sqs 3y agoYou're free to use the workflow used by the Linux kernel, but a lot of people prefer Graphite because it is easier to use and integrates with GitHub PRs better. If you find value in Graphite (as many devs do), then you can pay $30 and support its development.
- probably_wrong 3y agoMy impression as a grumpy person is that this article mixes the cause and the consequence. The main argument seems to be "shorter commits are less likely to have bugs and are merged faster, so if we split a 900-lines commit into 9 100-lines commits, then our codebase will be better". But the issue with shorter commits is that they also tend to be less critical - splitting a large commit into smaller chunks is generally a good idea, but the complexity still has to go somewhere. Yes, structuring your commit in shorter chunks is helpful because it forces you to better think about what you're doing but that's a correlation, not causation. I can be convinced that this silver bullet actually helps, but for that I'd need a before-and-after comparison of using the tool.
- from-nibly 3y agoYeah this is also like the mythical man month. 0 chance you can split a 900 line code Change into only 9 100 line commits. You need to make sure all your commits compile and work without breaking stuff. It requires it's own skillset and strategy to do this. Plus when seen in isolation bad code might be easier to push through like cooking a frog.
- jckahn 3y agoRather than stacking PRs, wouldn’t it be faster and safer to incrementally check in work to the mainline branch and keep it behind a feature flag?
- benrutter 3y agoThe advice here is essentially just the time old "keep PRs small and incremental so they can be properly reviewed", but its nice to see some of the stats/data around the size of pull requests in the wild. I'd be curious to see what those repositories where, and how differently things look based on, say, number of contributors. I found this really interesting: > According to Graphite’s data, only 24% of massive 1000+ line PRs receive any review comments. But would love to know what these PRs actually looked like in detail. I have a bunch of stuff on github where I'm essentially the sole maintainer and user, if anyone analysed those projects, there'd see lots of bad practices, like uncommented PRs, commits to main etc etc. I don't think anyone would be too concerned about those things in my tiny repo though, but I'd be pretty terrified if I saw that kind of stuff happening on a big project with a huge userbase.
- creshal 3y agoEven in multi-user or organizational repositories, I wonder how many >1k SLOC RPs involve tons generated code or (poorly) vendored external dependencies. Typically it's pointless to try to review that in detail, either it applies cleanly or it doesn't.
- drewcoo 3y agoHonestly, the things I've seen slow down deploys and engineering schedules are: 1. Using Git Flow. This inevitably leads to many branches for different teams/deploys/reasons and cherry picking among them and something always goes wrong. Because management opted into depending on a fragile branching system. 2. Many repos with some kind of inter-repo dependencies (usually testing or ops). Some of that can be cleared up with packaging. Some maybe not so much. This is another kind of complexity that management chooses, but management fails to account for that complexity when scheduling. The "oh, no, your PRs are too big!" problem happens with every dev. Probably more than once. But it doesn't seem like a serious ongoing issue. As long as someone says "oh, no, your PRs are too big!" It's recognized as a problem and dealt with. The other two I've mentioned are not even recognized as problems.
- Zacharias030 3y agoI can just get my code past reviewers better when broken up in many small PRs, but I absolutely need to be able to keep working downstream of such changes without waiting for reviews. The result is that I‘m much more comfortable with a tool that helps me manage a stack of PRs. I used ezyang‘s ghstack for a few years, but the polish of graphite is worth it for me. I agree that big PRs slow down everyone, but managing many small PRs still slows down the developer herself.
- michaelt 3y ago> For speed and quality, PRs should be maintained under 200 lines—with 50 lines being ideal. Personally, I've never been comfortable signing off changes that don't correctly and fully implement the requirements. If I see a function has something that might be a security bug, depending on how it's called from elsewhere in the codebase, how am I supposed to recognise it as a bug or otherwise, when the code to call it hasn't even been written yet?
- raziel2p 3y agoWe should probably be doing periodic full codebase reviews anyway, regardless of how PRs are being made. It's only our tools that encourage us to purely look at the diff of a PR rather than check out the branch and think more big picture. You could also encourage/force people to write design documents or such before starting work on the actual PRs. Though, a PR that introduces dead code (function that isn't called anywhere) wouldn't get approved by me :)
- from-nibly 3y agoThat never happens. There are like 100 things that need to happen that never happen that should happen before doing a whole code base review. Reviews either happen before it's merged or they never happen.
- aseipp 3y ago> how am I supposed to recognise it as a bug or otherwise, when the code to call it hasn't even been written yet? You would just leave a comment on the change, and ask for the author to explain themselves? Or propose they fix it? I mean, that's the entire reason you're doing the code review?
- nubinetwork 3y agoWhat really slows git down is asking PR writers to rebase constantly while they are trying to fix typos in their PR.
- OJFord 3y agoThis just seems to conflate PRs & commits, or not care about the latter at all; the perspective of someone who files a PR with 100 commits like 'fix typo', 'try again', 'the test broke', etc. > For speed and quality, PRs should be maintained under 200 lines—with 50 lines being ideal. Is maybe a reasonable goal for a commit. The PR should then have as many of those commits (which probably doesn't strictly sum their LoC count) as necessary for the feature/fix. Edit: In fact - I thought this was familiar, I just couldn't find a past submission from the same URL, because it was a newsletter puff-piece - I've said similarly before here: https://news.ycombinator.com/item?id=37917559 https://news.ycombinator.com/item?id=37917559 Also related, even more recently, is GitButler: https://news.ycombinator.com/item?id=39357068 https://news.ycombinator.com/item?id=39357068 which despite my scepticism there I think is a better solution for this 'problem' (i.e. an easier way to handle rebasing dependent branches) than for some reason having to up-end code review as a side-effect; I don't really understand the link at all if you look at Graphite's home page and 'learn more about stacking', nice to make that easier but what's it got to do with how we review the changes on those branches?
- man4 3y ago[dead]
- rjmunro 3y ago1 commit per PR sounds like terrible advice, unless it's a change of just a couple of lines. Don't squash your PRs to make logs look shorter, learn to use the `--first-parent` option to show only the merges if you want less detail.
- Zacharias030 3y agoCan you elaborate? Our team has a squash-and-merge policy that I never questioned before. I guess people just don’t write clean commits and consider a PR the smallest unit that makes sense.
- rjmunro 3y agoOver-simplistically, I might have commits like: * Add new field to the database * Add new feature to API * Add new feature to front end * Add new feature end to end test Each would make sense on it's own from a code review point of view, but the full feature doesn't exist until they are all included. You don't want to merge them one by one because QA would have to test every step doesn't break something else, but wouldn't be able to test the feature itself until later. Splitting it up means code reviewers can consider each part without the clutter of the others, and git blame may be more helpful in the future (although maybe not in this over simplistic case).
- from-nibly 3y agoCommits should represent a single change that can be added or reverted independently. Everything should be squashed to that point, no more no less.
- mpweiher 3y agoI had some colleagues at a former company who absolutely swore by this. Being used to trunk-based development, my approach was simply to make small commits. And if you insist on PRs, make small PRs. Although not totally cost free, they are easy enough to create that the overhead is trivial even with very small PR sizes. I asked them how this improved on just making small PRs, particularly with the need for extra tooling an complexity, and all I got was blank stares. Reading the blog entry, I don't see anything that goes beyond "just make small PRs. And now here's some tooling that's totally unnecessary if you make small PRs, but you'll have to organize your big PRs as a set of smaller PRs anyway" What am I missing?
- vasco 3y agoSmall PRs and more than that, small work chunks are a really good way to get a team going and to be able to be more agile. Estimation is also easier because instead of even T-shirt sizes all you do is "is it small enough?" / "can we finish this task in under 1-2 days?" and if you do that to everything you can get pretty fast (and still offer predictability to the business by measuring throughput).
- travisby 3y agoI used a stacking review system at two other roles (gerrit and phabriactor). At the time I found it annoying and missed the pretty Github UI and the ability to bunch commits together. Now that I'm using Github full time, I miss the stack. I found stacks allowed me to easily commit for a few problems at once without bogging down a reviewer. It sounds like you're already a fan of PRs being small, and that probably means _doing one thing_. What about a spelling mistake in a nearby but unrelated comment? That probably should be a separate PR. In the stack-world, I was happy to make a second commit, create a second review artifact, and be OK with it shipping eventually when the other features of my commit ship (especially if they're close enough to cause a merge conflict!) Today, I have to: * Stash/commit -m temp my current work * Checkout a new branch, make the fix, push it up, make a PR, etc. * Check back out my old work, potentially rebase on top of it if it's going to cause a merge conflict * get back to work on the real issue * Create a PR for the real issue... and hopefully not have it reviewed until the doc fix is already merged, because it's going to show up as an unrelated change here anyway! There's also merge-into-other-branches that might help with this workflow, but I haven't found anything graceful yet. In practice, I avoid the documentation fix to avoid the change in flow, when I'd have been happy to just have it as a different commit in the stack. -- that covers more generically why I like stacks, I'm not sure graphite would solve my problems after reading the OP though.
- fl0ki 3y agoI'm one of the most obsessive team members when it comes to commit / PR size and hygiene. I want each PR to change just one thing, for the commit title to uniquely identify it, and the rest of the commit description to explain everything a reviewer or future maintainer would want to know. But even I don't insist on any particular line count metrics. Sometimes doing just the one thing does mean a 1k line PR or more. That might be the MVP of a feature or refactor that's in a state that can be reviewed. Splitting it up into functions which can't yet be understood in their broader context makes them harder to review, not easier. I do try to split out any preliminary refactor which makes the big diff smaller and more focused, but sometimes that just shaves off 10 lines. It's good hygiene but it doesn't change the reviewer's experience much, and the commit description now has to pull the weight of explaining why this refactor came first. Stacking is definitely a huge pain in GitHub and after years of attempts I have mostly given up. I very occasionally include multiple commits in one PR, so reviewers can switch between focusing on one change and seeing it in broader context at their choosing. `git rebase --interactive` means amending the whole branch is still just one command with no third party tooling to buy or learn. I think it's a very reasonable compromise with the tools available today. The biggest limiation is they can still only approve the PR overall no matter how many commits it has, but when you do this you scope the PR appropriately for that. That's the Linux kernel model of splitting commits but still soliciting review for the lot of them.
- raziel2p 3y agoI'm starting to lean towards, this is a people problem and not a tools problem. As as senior engineer, either I want to review every single change that's being made and I should be doing pair programming anyway, and PR approval is almost purely symbolic. Or, I trust my colleague enough that I'll spend 5 minutes looking at their justification, explanation, testing strategy, rollout plan and decide to trust their code. Stacked PRs and insisting on small PRs seems to want to fill some gap in the middle between these two, which isn't necessarily the correct solution.
- fl0ki 3y agoI've worked in environments where we had several people per large project and reviewers could genuinely point out important context from parts of the project they were more familiar with. It was an awesome environment for learning not just the project but experienced engineering in general. Now I'm in an environment with several projects per person instead of several people per project. Now not only do we have a bus factor where nobody is familiar with anything but their own projects, even if they do review something they can't do much to anticipate issues or add context. Reviews have higher friction and less value. For my own projects, I have instead invested in really rich testing, far beyond any other project here. It not only lets me move forward without regressions, it means if someone else ever has to take over without me, the tests will teach them broader context and catch regressions. All crafted in a way that test expectations are still easy to update when changes are intentional. But I'm still the only one doing it this way. Most projects have 0 tests, or worse, lots of clunky tests of which 0 are useful. At best I'm hoping I can inspire others to follow even if it's only for their own sake at first. I'm not holding my breath for systemic change.
- danirod 3y agoIn my experience, stacking a big feature in multiple small pull requests plays well in order to start reviewing and delivering work that can be merged mainline while building more parts of the feature (say, sending for review a service object or an API client while you are working on the controller for that service), and it is easy to do with any Git client. However, it starts to erode when a change in one of the initial layers has effect on others, such as having to make a change in the service layer that affects the way you pass a parameter in the upper layers. Then you find yourself just doing a rebase nightmare to keep the whole set of PRs in sync. I wonder how many companies or teams would consider paying 30 bucks a month per user just to solve this problem.
- Zacharias030 3y agoI think the killer feature of graphite is that it doesn’t just support a stacked PR workflow, but let’s you maintain a tree of stacks ahead of master. I found that to be the killer feature and rebasing a tree of branches on top of a pull of master while keeping its branchpoints intact is extremely well done in graphite!
- wink 3y agoOP seems to be ignoring sensibilities of maintainers and how seamless getting a PR in is per se, without looking at the changes at all. It may not be the norm, but I've seen occurrences of 3 smaller PRs taking longer to be reviewed and merged (for bogus reasons, not because they touch hot code) than one big chunk (best example would be a maintainer who is arguing about literally everything that is not their own code). Sometimes the process is the actual problem. Maybe it's even worse in companies than in open source projects... On the rest, I am not disagreeing at all, it just might be worth looking at the reasons, but I hope statistics will sort out what I described above.
- aqme28 3y agoBig PRs are often faster, due to the bike shedding problem. A small sensible PR will get people debating intricacies. A big unwieldy one will scare reviewers into doing a quick sign-off
- londons_explore 3y agoI disagree. 1 PR should map approximately to 1 benefit (ie. a new feature or bugfix). If the feature is huge, the PR can be huge. If reviewing huge PR's is a burden, I will make better tooling for it. What I don't want is a big feature to be split into 10 PR's, where the first 9 provide no user benefit and are just refactors or adding dead code ready for the last PR.
- bayindirh 3y agoAlso, A PR can contain tons of commits, and if the commits are well cut, it's very easy to understand implementation of a new thing step by step. This is why Linux kernel workflow contains n patches per feature. To understand what's done in a clear manner. Lastly, adding feature flags to mask incomplete feature code paths is very risky, and is a bug by itself I think.
- Zacharias030 3y agoWouldn’t it be beneficial to get the 9 refactors merged even though the 10th commit needs iteration? It would make it much easier for colleagues that can then branch off of the tested and merged refactors without running into merge conflicts later.
- oooyay 3y agoNo. If the feature requires 10 commits and only 9 are universally agreed on then under this model you would merge 9 commits. Those 9 commits, despite doing nothing, would have agency and real estate in the code. There's nothing that says that 10th commit will even get merged if it's so controversial. To be frank, PRs are almost never universally controversial. It's the details that make them controversial, so this outcome is likely more often than not.
- grumple 3y agoIf the feature is huge, you should be having incremental reviews throughout the process. The PRs should be made to the feature branch.
- aqme28 3y ago
- iandanforth 3y agoThis is an ad. It doesn't introduce anything new and is probably not a great solution to the posited problem anyway. Put in-progress code paths behind development flags and merge frequently to main. That one sentence removes the need for extra tooling and obviates the need for more buzzwordy workflow names like "stacking" or "trunk based" or whatever the trendy thing is at the moment.
- bryanlarsen 3y agoWhat do you do if CI is slow and you're merging small commits frequently? For example, what if CI takes 15 minutes and you're trying to merge more than 4 PR's per hour? Our integration tests spin up and reboot Windows machines, it would be tough to get that test under 15 minutes. We use the "merge when pipeline succeeds" button on GitLab, but if two people have clicked that button it's a race. The winner gets their PR merged, the loser gets their pipeline invalidated because `main` has changed; they have to rebase onto main and try again. OTOH, if instead of rebasing onto main when running the final pipeline before merge you rebase onto what will be main once its pipeline succeeds your own pipeline will still be valid. In other words, by using stacking we can do final merge CI pipelines in parallel rather than series. Unfortunately, we haven't found good tooling for this flow that works with GitLab. git town does stacks and works with GitLab, but it has a few limitations that make it a poor fit for what I call "merge trains".
- iandanforth 3y agoWe have dozens to hundreds of PRs merged per hour using this flow. Yes the pattern of requiring unchanged main causes a backup. Don't do that.
- bryanlarsen 3y agoAnd you never break main doing that? MR A could be fine, MR B could be fine, but A+B can be broken. It's rare, but it does happen. It's not common enough to fix if the alternative is slowing down merges. But you can have your cake and eat it too -- merge trains allow rapid merging and ensure that the combination gets tested before merging.
- netik 3y agoadvertisement pretending to be helpful.
- barrkel 3y agoLooks like a partial attempt at reimplementing Google's Piper/Critique workflow. Which works well, but not on GitHub because GitHub is not like Critique or even Gerrit. Stacked commits need frequent rewriting of the stack. You push the first commit or two for review then you continue onwards. But you need to address comments on the earlier commits so you continually need to rebase things. This is tedious in git without extra tooling. The review tooling needs updating to match. Ideally you have 2 dimensional navigation of the stack: up and down the stack, and left and right across revisions. As a reviewer you want to be able to see the delta between revisions of the same (rewritten, force-pushed) commit to see that comments have been addressed. This needs a UI more like Gerrit and less like GitHub. It also requires some cooperation like Gerrit change IDs so rewritten commits have persistent identity beyond their content hash.
- godzillafarts 3y agoMy experience, and my team’s experience, with Graphite has been the complete opposite. Graphite slowed us down considerably, which is a shame because it seems like Graphite was purpose built for a development workflow like ours. We continually stack changes to make code review less burdensome. We had been doing it in just git for some time and decided to try out Graphite. Graphite is quite hostile to collaborating on stacked branches. If one dev restacks and a collaborator is working in a dependent branch, they’re hosed. If a collaborator pushes a change to a dependent branch and they're not using Graphite, hosed. I think one of the main problems is that Graphite abstracts out potentially dangerous git commands into a fancy CLI such that the dev doesn’t really know what’s happening under the hood. It makes things even worse if you’re trying to collaborate on stacked PRs and not all devs use Graphite. Just forget about it. We could have just been using this tool “wrong” but we had to stop using it within our team because it became so disruptive. At the time it seemed like you should only use Graphite if: 1. You are the only person working on a stack. You do not expect collaborators to be pushing changes to any of the branches within the stack, and 2. Everyone on the team is using it too. Maybe things have changed in the intervening time, but I’m always dubious of tools like this. It’s just git. It’s a wrapper CLI around git with a nice GitHub PR integration and a dashboard. It’s already easy to stack branches in git.
- aosoble 3y agoI’m think that you’re not supposed to have more than 1 person working on the same stack. I used the stacking workflow years ago when I was working at Facebook. As I recall no one rebases their work on top of someone else’s unmerged stack. I haven’t used Graphite though so I can’t be 100% sure how they intend it to be used or how they advertise the stacking workflow. You mentioned that you started stacking commits before trying out Graphite. What made you begin stacking in the first place? Did someone on your team use stacking before? I recall the one of the Graphite founders saying that they got a lot of their early customers because of ex-Facebook or ex-Google engineers who missed their stacking workflow.
- moribvndvs 3y agoShould you prefer small, incremental changes? Yes. Do you need be pathologically averse to PRs that hit some arbitrary limit? Absolutely fucking not. I just had to do a code refactoring that resulted in 1600 files being deleted. Stacking 40 PRs would have gotten me actually stabbed by my team, and I would have deserved it. Your commits should be atomic, the smallest number of changes to achieve x, where x is a single task that can easily summarized by the commit message. Your PR should contain the smallest number of commits required to achieve y, which is either a minimum viable product to achieve feature z (if z is small enough to be done in one step/PR, good for you), or a step in the path to achieve z. Start your review early (using a WIP/draft PR) if you have the misfortune of having to do a large refactoring so your reviewer(s) can get in on the ground level and review in chunks. If you’re following the rule of “atomic commit” above, it’s really not a big deal for a reviewer to look at changes between each commit which can speed up reviews of big refactorings.
- deleted 3y ago[deleted]
- aschen 3y ago[dead]
- from-nibly 3y agoStacking changes sounds insane. If you did this while talking to someone face to face they'd look at you like you were crazy. You are asking for feedback and then effing off somewhere else and then before they can even give you feedback you are asking for more different feedback. What if the feedback on the first commit was "this is trash and needs to be redone"? Then you have to redo both commits. This is the same reason why waterfall doesn't work. This flies right in the face of Lean. TOC says you are NOT being more efficient doing this. Do one thing at a time get feedback and then move on. Don't stack a bunch of changes in a queue so you can remove the slack out of the process. THE SLACK IS SUPPOSED TO BE THERE!
- mwpmaybe 3y agoIf you're interested in some of these concepts (i.e. smaller, more incremental PRs and stacked branches) but don't want to jump whole-hog into using a new product or tool, I highly recommend taking a look at `git rebase --update-refs`[0] to grease the wheels so to speak of implementing a similar approach with stock tooling. There's a great write-up on the feature and how it can help you here[1]. [0]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---update-refs https://git-scm.com/docs/git-rebase#Documentation/git-rebase... [1]: https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-branches/ https://adamj.eu/tech/2022/10/15/how-to-rebase-stacked-git-b...
- kartoshechka 3y agowe tried to break up features into smaller PRs at one $dayjob, and the problem with small increments is that you have to plan out to some degree of detail upfront, which can't be always fast, and isn't always reasonable. otherwise, you can miss the bigger picture reviewing intermediate "steps", especially if it isn't the same person who reviews the entire feature. also juggling branches doesn't scale beyond single repo, use worktrees instead