3 ms·
Cherry-picking (pun intended) a comment elsewhere itt: > Crafting commits is hard if one wants perfect commits and most of us don't have time to do that. This
by infogulch 5y ago
Cherry-picking (pun intended) a comment elsewhere itt:
> Crafting commits is hard if one wants perfect commits and most of us don't have time to do that.
This is a common sentiment, but I really think that this is a product of the tooling instead of a fundamental difficulty of the task. If it wasn't such a pita to split, join, and shift commits around then people would consider trying to do it more often.
Another comment:
> TIL: Splitting A Commit
> git rebase -i <ref> Mark commit as 'edit' Continue with rebase, it will stop on 'edit' marked commit git reset HEAD git add --patch git commit git rebase --continue
What is the mountain of context that someone needs to know before even that "one simple trick"-style explanation would make any sense at all? How would you describe or recommend that process to someone in a technical non-dev role that has never used source control? You wouldn't. So they'll never split a commit. So now you have an avalanche of users that don't even approach the problem of crafting a PR with the mindset to produce clean commits, so it can never become the norm.
At the least we need a more direct way to accomplish three main things: split a commit, merge adjacent commits into one, reorder commits. If these "basic operations" on commit chains are easy to accomplish we might have a chance at having a clean git clean history.
- rusk 5y ago> How would you describe or recommend that process to someone in a technical non-dev role that has never used source control? That’s the audience though. I know technical non-devs in various roles that would kill for the kind of features that git provides. They’re stuck manually versioning files. There is definitely a market out there for something like this but even simple version control is very tricky for non-devs. It’s just something we’re more intitivively good at probably to do with how we approach breaking down problems. Animators, graphic designers, architects etc tend to think more holistically. If they use these tools at all they’re usually a service provided by some in house experts, such as the engineering team or IT.
- omegalulw 5y agoThis seems like a horrible way to split a commit. After the interactive rebase stops just do an interactive add and let the rebase continue.