Assuming we have a git commit history which looks like:
ZZ [origin/master] A -> B -> C -> D -> E [master]
We want to:
- Rewind the history back to before
A. - Keep the working directory of
E. - Bundle all the changesets of
A..Ein to a single commit. - Push the outcome to remote.
The result should look like:
ZZ -> XX [master][origin/master]
Where XX is the commit encompassing the changes of prior commits A..E