To get this message:
On branch main
Your branch and 'origin/main' have diverged,
and have 3 and 4 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
- clone this repo
git rebase -i HEAD~4
- delete the first commit (at the top)
- do a
git status
Note: doing a git pull
will give:
git pull
fatal: Not possible to fast-forward, aborting.
Fix:
git reset --hard origin/main
This resets your local main
branch to origin/main
.