41 ms·
> Git generally works better without rebases and squash commits. If squash commits make Git harder for you, that's a tell that your branches are trying to do t
by KPGv2 7mo ago
> Git generally works better without rebases and squash commits.
If squash commits make Git harder for you, that's a tell that your branches are trying to do too many things before merging back into main.
- ralferoo 7mo agoI don't know. Even when I'm working on my own private repositories across several machines, I really, really dislike regular merges. You get an ugly commit message and I can never get git log to show me the information I actually want to see. For me, rebasing is the simplest and easiest to understand, and it allows you to squash some of your commits so that it's one commit per feature / bug-fix / logical unit of work. I'll also frequently rebase and squash commits in my work branch too, where I've temporarily committed something and then fixed a bug before it's been pushed into main, I'll just reorder and squash the relevant commits into one.
- andy_ppp 7mo agoI completely agree, since doing rebase our history looks fantastic and it makes finding things, cherrypicking and generating changelogs really simple. Why not be neat, it's cost us nothing and you can make yourself a tutorial on Claude if you don't understand rebasing pretty easily.
- andy_ppp 7mo agoDon't do squash commits, just rebase -i your branch before merging so you only have one commit. It's pretty trivial to do.