Andrew Truckle
Andrew Truckle

Reputation: 19207

Changing multiple commits with TortoiseGit

I am a sole developer and have no worries about anyone else changing my remote repositories.

I have realised that several of my recent commits were wrong:

enter image description here

All of the [MSA-27] [MSA-37] should have been [MSA-27] [MSA-36]. These codes are important for Jira Issue board. What is the easiest way to correct all of these?

Upvotes: 3

Views: 833

Answers (1)

MrTux
MrTux

Reputation: 34042

On the log dialog, select the last commit that is correct.

Then start a rebase upon this commit.

On the rebase dialog select "Force" and mark all commits you want to modify as "edit".

Then start the rebase. The process will halt after each commit you marked are "edit" and allows you to modify the commit message (if you also want to modify files in the commits, check "Edit/split commit").

Upvotes: 5

Related Questions