TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Branchless Workflow for Git

54 pointsby modinfoover 2 years ago

7 comments

doixover 2 years ago
I feel like I have a pretty good understanding of git, but the problems these helpers are trying to solve make my head spin.<p>&gt; git rebase --interactive can only repair linear series of commits, not trees. If you modify a commit with multiple children, then you have to be sure to rebase all of the other children commits appropriately.<p>Can someone explain (preferably with a sequence of git commands) how you end up in such a situation? When would you end up modifying a commit with multiple children?<p>Is this for a case where a bunch of people branch from master@HEAD (lets call this A), then you need to modify A, so you then need to rebase each branch that branched from A individually?<p>I guess the workflows I&#x27;m used too explicitly try to avoid doing things that cause the problems that these helpers try to solve. I&#x27;m so used to thinking in this current mode that I find it hard to imagine when these problems would arise.<p>&#x27;git undo&#x27; terrifies me though. I really hate when there&#x27;s lots of magic going on and I don&#x27;t know what state my git repo will end up when I run a command. I rather run N commands, where I&#x27;m pretty confident what will happen in each stage, than one command that just &#x27;fixes&#x27; things. Because if it fails to fix something, I&#x27;ll be in some unknown state without understanding how I got into it.
评论 #34307568 未加载
sebazzzover 2 years ago
The biggest issue of working without branches is that virtually all code review tools nowadays work on a Pull Request basis (thus branches). Almost no tool allows adding individual commits to a code review, the only one I know is Upsource but that is unfortunately no longer being developed.<p>As my team does trunk based development we&#x27;re struggling with that. Since we&#x27;re not able to find a code review tool that is compatible with our workflow, I assume we are doing something wrong and trunk based development is no longer an industry practice - though it works very well for us.
评论 #34307362 未加载
评论 #34307550 未加载
评论 #34307466 未加载
bmitcover 2 years ago
Although GitHub offers a lot of features and generally makes Git tolerable, I’ll be pretty happy when Git gets supplanted by something else more popular and hopefully better. The latter should not be hard to do.<p>As someone who cut my teeth on Perforce, I’m still learning the ins and outs of Git and generally actively avoid Git features. Whereas with Perforce, I was writing custom applications using its API and powerful workspace concept in just a couple years. Perforce is just easier to understand, easier to customize, great visualization tools, and has more sane names for things.
评论 #34307556 未加载
评论 #34308429 未加载
tlarkworthyover 2 years ago
I have a lot of trouble pipelining my commits when I get reviewer comments on an early branch, it&#x27;s very error prone to squash the changes and distribute downstream to avoid merge problems later.<p>I think this tool is for me, am I able to adopt it without my team needing too?
评论 #34308238 未加载
antmanover 2 years ago
This is kind of presented like a tool but it really is a workflow, I think presenting it in an e.g. gitflow manner woukd make it more clear on how it would work on an example project
kramergerover 2 years ago
Why should I want to use smartlog instead of something like tig?<p>While at it, I am amazed how much effort people put into not using git as intended due to some (often imaginary) corner case shortcomings<p>I do like the performance improvements and git sync however, maybe they could be merged into mainline git?
wodenokotoover 2 years ago
What makes the workflow branchless?
评论 #34307172 未加载