I have two working branches, master and forum and I\'ve just made some modifications in forum branch, that I\'d like to ch
git checkout HEAD~1 -- files with unwanted changes and git commit. If not, files with mixed changes can be partially staged git reset file and git add -p file as an intermediate step.) Call this the revert.git revert HEAD – Make yet another commit, that adds back the unwanted changes. This is the double-revertgit rebase -i HEAD~3). This commit now becomes free of the unwanted changes, for those are in the second commit.