Reputation: 1633
When making many changes to a file, I want the changes to be neatly divided into easily-comprehensible commits for my colleagues to review. For example, commit 1 might be to factor out repeated code into a separate method, then after I make commits 2 and 3 (but before I push) I see another place where the new method can be incorporated, and I'd like to put this change in commit 1. Is this possible? If necessary I could then manually update commits 2 and 3 to incorporate this change.
Upvotes: 0
Views: 144
Reputation: 34135
You can use Interactive Rebase for that as follows:
Upvotes: 1