4 ms·
This sounds great,but kind of an anti pattern in git. I definitely want to have a "fixes" commit on my feature branch. You should do whatever you want on a fea
by dmead 2y ago
This sounds great,but kind of an anti pattern in git.
I definitely want to have a "fixes" commit on my feature branch. You should do whatever you want on a feature branch so long as your trunk has a clean history.
This sounds like someone wanted to lift a feature of changesets in mercurial into git. I don't think this is safe and probably breaks a lot of people's mental model of git changelogs being an immutable data structure.
- saagarjha 2y agoAt some point the changes are going to get merged in, no? And that that point I would really like the commits to be nice.
- dmead 2y agoThat's why you squash and make the commit message readable.
- saagarjha 2y agoSquash all the commits I worked so hard to make atomic?
- cryptonector 2y agoNo, you don't want to squash everything into one commit. You want logical, clean history.
- snatchpiesinger 2y agogit log --first-parent
- cryptonector 2y agoThis is no more nor less safe than `git rebase`.
- keybored 2y ago> I definitely want to have a "fixes" commit on my feature branch. You should do whatever you want on a feature branch so long as your trunk has a clean history. This tool creates `fixup!` commits. These commits aren’t rewrite commits. They are commits which later can be used to rewrite the history. You can use this tool, not rewrite your branch, and then rewrite the branch right before merge. > This sounds like someone wanted to lift a feature of changesets in mercurial into git. I don't think this is safe and probably breaks a lot of people's mental model of git changelogs being an immutable data structure. Rewriting is a huge part of the Git culture (and well-supported). Meanwhile Mercurial seems to have rewriting as a sort of add-on.