- Fork repo
- Create feature branch, do some work
- PR upstream from feature branch
- Work is accepted/merged into upstream master
- Delete feature branch (Can do this via GH interface on upstream PR. This will also delete the branch in your repo.)
- Delete local branch because you like to keep things organized and clean, and this feature branch is dead to you.
- Rebase your repo to get everything in the same place by doing:
git fetch upstream
git rebase upstream/master
git log --graph --oneline --all
- Basically, you're pushing an empty branch over an existing one:
git push origin :feature-branch
ie, git push origin [EMPTY HOLE WHERE INFO COULD BE]:feature-branch