Closed XDcedar closed 1 year ago
I was unable to reproduce your output.
Initial
* da41c58 (HEAD -> caption) C3
* 8012985 (newImage) C2
* 72bcc6e (main) C1
* 8d10241 C0
git rebase -i HEAD~2
git add . && git rebase --continue
1st time
git add . && git rebase --continue
2nd time
Thank you for your reply!
I noticed that you've run rebase --continue
twice, while I only ran it once. (Git didn't ask me to run it again.) This behaviour led me to try some further testing, and I found something new that may help:
echo
command in Windows 11, a UTF16-LE
file is created, which Git treats as a binary file. As a result, the conflict hints fail to show up, and if I run git add .
followed by git rebase --continue
without making any modifications, the rebase procedure ends prematurely with only three remaining commits, which is what I showcased.UTF16-LE
file and make some modifications each time before continue rebase procedure, it triggers twice as expected.UTF8
file and edit it mannually instead of running echo
command, Git behaves normally, requiring --continue
twice and ending up with the correct answer.Therefore, it seems that it's a Git issue? But I am still unclear about the root cause of the issue. Do you have any ideas why this is happening or where I should looking for the answer? Thanks for your help so far!
I repeated everything with Windows 10 and I am still getting the correct answer (Windows 10 created UTF-8 file). Earlier I was using Linux (OpenSUSE Tumbleweed).
As I am unable to reproduce issue due to technical limitations required by Windows 11 I cannot investigate further in this anomaly.
There are lots of search results for UTF-16 git issues
so I guess it is some popular problem with git and there could potentially be some solution. Maybe here you can find some answers.
I wish you best luck with this.
This issue should be marked as closed.
It's OK! At least now I know it's a problem related to UTF-16 encoding and how to avoid it. I will look for answers elsewhere. Thanks for your help!
Hello, I am currently learning Git using your excellent website. But I encountered an unexpected behavior while using the
rebase -i
command onlevel mixed2
. It appears to be different from the actual Git command behavior.Here is how to reproduce this issue:
Commands I use
And here is the result:
git rebase -i HEAD~2
, as per the solution provided on your website.exchange these two commits. same as the solution on website shows
pick 62e95dd # C3 pick 1f4ae67 # C2
resolve the conflicts and then...
git add . git rebase --continue