HackerTrans
TopNewTrendsCommentsPastAskShowJobs

conor_f

no profile record

Submissions

Why You Should Be Using Git Worktrees

blog.randombits.host
5 points·by conor_f·9 เดือนที่ผ่านมา·6 comments

comments

conor_f
·3 เดือนที่ผ่านมา·discuss
This is a perfect example that I've often seen in practice. There's nothing blocking in this workflow at all, and no reason these changes cannot be made in independent changes. e.g.

1) API implementation - Including tests and docs this should be perfectly acceptable to merge and review independently 2) UX implementation - Feature flagged, dummy API responses, easy to merge + review 3) One quick "glue" PR where the feature can be integration tested etc

This prevents awful merge conflicts, multiple rounds of increasingly complex stacked reviews, and a host of other annoyances.

Is there any reason that the stacked PR workflow is better that I'm ignoring or overlooking?
conor_f
·3 เดือนที่ผ่านมา·discuss
This just reeks to me of bad practice. Why use this as opposed to breaking your change into smaller PRs and merging them individually behind a feature flag or similar? With this, you have a marginally better UX for reviewing through the Github website, but the underlying issues are the same. The change being introduced is not sufficiently testable by itself, or it's (somehow) too tightly coupled to other parts of the UI/codebase that it can't be split. You still need to test for integration issues at every point of the stack, and some architecture issues or points of code reuse can't be seen from stacked changes like this.

Not for me, but I'm glad it fits other people's workflows. I just hope it doesn't encourage people to try make poorly reasoned changes!
conor_f
·9 เดือนที่ผ่านมา·discuss
Super interesting, thanks! I didn't think about how this issue could easily point to a major improvement that could be made on the package manager level. Unfortunate that in Python land only Conda supports it though. It looks from the docs that uv may also support it? https://docs.astral.sh/uv/concepts/cache/#cache-directory
conor_f
·9 เดือนที่ผ่านมา·discuss
A great point. However it's not a reasonable amount of infrastructure or overhead for many companies or an individual project in my opinion!
conor_f
·9 เดือนที่ผ่านมา·discuss
Here's a quick blog post I wrote about the merit of git worktrees. Any thoughts or feedback let me know!