I try to run
git rebase -i HEAD~N
to squash my older commits into one. But sometimes I got a Merge conflict. The problem is, even if I resolve the conflict and do a "git rebase --continue", I lost a lot of my other commit changes.
I also tried to solve the issue based on these answers: Git squash all commits in branch without conflicting