On Thu, Jun 16, 2022 at 04:01:20PM -0700, yakou tsuchimikado wrote: > First step > > echo "1111111111" >> test.txt && git commit -m "1" > echo "2222222222" >> test.txt && git commit -m "2" > git rebase -i HEAD~2
Technically speaking this script is incorrect as `git commit -m message` won't record any changes made to test.txt because they were not added to the index. Supposedly you should have used `git commit -a -m message` - provided test.txt was added in some commit before these two. > Next change the configuration similar to the following > > s hash 1 > p hash 2 > > Then the git will tell you that you made a mistake > > git rebase --edit-todo > //set the configuration similar to the following > //it's worth noting that 'p hash 2' doesn't show up > p hash 1 > git rebase --continue > > Finally, the second commit disappeared! Well, the bug is actually dropping the second line from the rebase script (what you have called "configuration" is a "rebase script" in Git's parlance). Hence executing the script with the second entry missing _will_ legitimately drop that commit. [...] > git version 2.33.0 I observe the same behaviour with Git 2.30.2 [...] Please report this bug to the main Git mailing list dedicated to its development [1]. This one is for helping mere mortals with their day-to-day prblems using Git; reporting bugs here is worthless as this list is not read by the devs. 1. https://gist.github.com/tfnico/4441562#writing-an-email-to-the-developers-list -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/20220617111127.uxkwmz22huln6axd%40carbon.