Keeping Your Fork Updated
git remote add upstream https://github.com/original/repo.git
git fetch upstream
git rebase upstream/main
Interactive Rebase
Clean up your commits before submitting a PR:
git rebase -i HEAD~3
Amending Commits
git commit --amend
git push --force-with-lease