Force Push
After the rebase the bottom-section
branch in our local repository contains one commit with a new hash (for me c53f370
on the previous page). But the branch in the remote repository on GitHub still has the old version of the commit (hash be19827
for me).
Git doesn't know how to handle this situation. If you try to push the branch via
git push origin bottom-section
you should see an error in the terminal. You can try it for yourself.
The git push
command has an option -f
to force the push. This means we force GitHub to overwrite the remote branch with our local version.
Note that it's only safe to force push this way if you're the only developer working on the branch. Otherwise, you might overwrite changes that another developer created. That might result in some angry reactions.
In general, it's a better idea to use the lesser known force-with-lease
option.
Run the following command to update the remote repository.
git push --force-with-lease origin bottom-section
Note: If you still had the Pull Request on GitHub open in your browser it might look a bit weird now with duplicated commits. Once you refresh the duplicates should be gone.
Great! We're at the end of the review path of the roadmap.
News in the Content Container PR
Maybe you received a notification already? By now ooloo-bot
has reviewed the Content Container Pull Request again.
Go ahead and open it on GitHub before you continue.
Next: Interactive Rebase