I've committed a bunch of changes to a repository, and they were reverted by someone else (they compile on windows but not on linux). I think that the changes are still in the history, but how can I get those changes back, fix them, and then resubmit?
Instead of deleting or orphaning commits in the commit history, a revert will create a new commit that inverses the changes specified.
Have you tried reverting the revert?
They reverted your commit using
git revert <your commit id>
The revert itself is a commit and has its own commit id. So now you need to do
git revert <the commit id of his revert-commit>
You can try reverting the reverts, using git revert
. You can also restore the files from your commit using git checkout
. Or you can use git cherry-pick -n
to re-apply them and change them. You can create a new branch from your commit where you apply the changes using git branch
. The possibilities are (almost) endless. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With