CTO at SourceLevel·

One of the magic tricks git performs is the ability to rewrite log history. You can do it in many ways, but git rebase -i is the one I most use. With this command, It’s possible to switch commits order, remove a commit, squash two or more commits, or edit, for instance.

It’s particularly useful to run it before opening a pull request. It allows developers to “clean up” the mess and organize commits before submitting to review. If you follow the practice 3 and 4, then the list of commits should look very similar to a task list. It should reveal the rationale you had, telling the story of how you end up with that final code.

READ LESS
7 Git Best Practices to Start Using in Your Next Commit – SourceLevel (sourcelevel.io)
9 upvotes·987.7K views
Avatar of Weverton Timoteo

Weverton Timoteo

CTO at SourceLevel