Why git rebase overwrite my local changes? How to avoid overwrite?

11,487

First things don't forgot add & commit current files before taking rebase.

After conflict resolved in files manually. to mark as conflict resolved use git add <file> then git rebase --continue. then git push

Share:
11,487
ever alian
Author by

ever alian

Updated on June 15, 2022

Comments

  • ever alian
    ever alian almost 2 years

    I'm trying to rebase my branch with the master. But it is always overwrite my local changes after rebase.

    I'm using the command git rebase and it will show one file conflict, then I manually resolved the conflicts. After tried git rebase --continue . Then I found my local changes are missing.

    How to preserve the local changes and rebase with a master?