Automatic Rebase of Last Commit in Git
Introduction I often find myself in the situation where I have just pushed a branch with my changes and created a pull request, only to later realize that I forgot to add a file or made a typo in my code. In such cases, my goal is to make a small change while maintaining a clean Git history, so I opt to rebase the last commit to essentially hide it. Of course this wouldn’t work if there was a chance that someone already used my branch or I cooperated with someone on it....