The word "delete" is not correct in your claim "then i delete all commits except for 990cfb1". You need to use squash
.
When you run $ git rebase -i 2347714
, you'll see text editor pops up showing your all of the messages like this:
pick 990cfb1 combine dump, add prog, combine validate
pick 41013a9 Merge branch '5flash_addr' into 6flash_bankcheck
pick 6f5e8f1 nothing interesting
pick 7b8140d nothing interesting
pick 2347714 implementation of dump and program
At this moment, I'd say DO NOT TOUCH the first one!(990cfb1). Then, for the remaining, replace "pick" with "squash" or "s" as the alias.
Now, save the file and exit editor.
Then, git rebase will continue running. After seconds, another text editor window will pop up showing you all of the commit messages.
At this moment, you are safe to delete all message and rewrite them to one sentence as the final commit message.
Now, save and leave. Git will do the following automatically. Done!
Side note
You may have problem following the above process because your "rebase" has already run but halt for some error.
You need to:
- Make a physical copy of whole git project to somewhere else at first!!!
- Then, run
git rebase --abort
- Start from clean state as per the process above.