`git remote add {name_of_remote} {remote_url}`
Adds a remote to your instance under {name_of_remote} (any unique name you decide) which will mirror {remote_url} to your repo.
git push origin 'refs/remotes/{name_of_remote}/:refs/heads/' --prune --tags
Pushes your remote and prunes all current branchs that don't exist on the remote anymore.
Warning! This means that all local work on that mirror can be lost. Generally I would recommend you don't work directly on the mirror repo. So the repo will looking like: Original > Mirrored Repo > Your Fork.
Explanation
`git rebase -i HEAD~{number_of_commits_to_go_back}`
git rebase interactively (commit by commit) from current head to number of commits ago.
git push --force-with-lease
git force push but only if there are no new commits
git rebase -i HEAD~{number_of_commits_to_go_back}
git push --force-with-lease