In my local branch, I ran the following to get the latest commits from main and rebase on top
$ git pull --rebase origin main
but ended up seeing a few conflicts. Seemingly resolved them but git status
shows my branch has diverged.
$ git status
Your branch and 'origin/branch' have diverged,
and have 8 and 5 different commits each, respectively.
My remote is all fine and contains the latest local changes before I rebased locally, and it contains 5 commits. Where am I getting the extra 3 commits from? The commits that my local branch rebased on top of?
I see one of the files that I added (which was deleted in one of the commits from
main
) is no longer locally there. Why that may be?
So conflicts are resolved, but how do I get my branch up and running from the mess it's in?
is force push the way? Are there consequences?