Hacker News new | ask | show | jobs
by samus 905 days ago
`git rebase -i develop` is arcane? An editor opens where you put an 'r' in front of every commit that needs rewording. Save and close, and Git will successively open an editor for every commit message. Force Push and you're done.

If you're not willing to bother with command line: the Git client in Jetbrains also lets you edit commit messages in a very straightforward way.

1 comments

Force push can be scary to some. Some nitpickers may also ask you to squash/reorder/split commits to satisfy their OCD.
I am one of those who would insist on correctly splitting commits. Commits are a communication tool, and a well-crafted series of commits makes reviewing pull requests, which is a chore for most people, a lot easier. Months or years later, it is still important to easily review changes.

In a Gitflow repository I don't particularly like squashing feature branches since a sequence of commits allows the author to better document what they were thinking about. Squashing is fine in Trunk-based development since feature branches are usually less extensive.

I hate intermediary merges on feature branches because they tend to make up a large portion of the branch history and are harder to review than normal commits.

Those nitpickers are probably people who have tried to track a regression in a big codebase before. It's not OCD, it's just useful version control.