git checkout main
git fetch
git pull origin main
git checkout [branch name]
git rebase main
git push --force
git checkout main
git fetch
git pull origin main
git checkout [branch name]
git rebase main
git log --decorate
- Copy the hash of the commit where main head is listed.
commit f8a93d554620964f0c2b0bf88c0bc7ccb305901a (origin/main, origin/HEAD, main)
git reset --soft [hash]
git commit -m ""
git push --force
https://fle.github.io/git-tip-keep-your-branch-clean-with-fixup-and-autosquash.html