In the "Log" tab of the "Git" tool window, select and right click the revision prior to commits to re-order. Choose "Copy revision number":
Use the "Git -> Rebase" menu.
Paste the revision into the text field.
Remove any other options enabled and add --interactive
option:
Use up/down button to re-order the commits where the commits are ordered top-to-bottom, oldest-to-newest:
Click "Start rebasing". You will be prompted to resolve any conflicts that might occur due to the re-ordering.
Top comments (1)
A word of warning though : Don't do that (or any other Rebase operation) after you've already pushed if you don't want your coworkers to hate you.
As you'll be rewriting history, you won't be able to simply push and you'll have to "force push" your new history, and basically all your team will need to delete their repo and start from the new one.