Interactive Rebasing
Interactive rebasing is a confusing name for a very useful Git functionality. From a user's perspective, rebase and interactive rebase have little in common.
Interactive rebase allows you to clean up your commits, but only before you push them to the server. With interactive rebasing you can:
- "Squash" your commits so that your commit history is sparser and easier to read
- Modify the message for your commits
- Fixup, which is just like squash except that it doesn't stop and ask for a new message
- Drop, which removes a commit
The key thing here is that you are modifying commits, not the files that go into a commit. And, as I'll keep mentioning, you must do this interactive rebasing before you push your commits to origin. You never modify commits once they are on the server because other developers may be interacting with the commits, and you will likely create conflicts, which are time-consuming to...