I've just learned about rebase, and I've been strongly warned not to rebase commits after they have been pushed to a remote. I want to make sure I'm not going to explode my repository
Example commit history
foo W---X---Y
/ \
master A---B---C---D---E---Z---F---G
Here, all commits on the master branch will likely have been pushed to origin/master.
Z
is an automatic commit made by git-merge by merging the completed foo branch (Y) with the current master (E).Since the completion of the foo module, master has made some updates (F and G).
Here's how I'd like to use rebase.
It's time to make some updates on the foo branch, but it's out of sync with the master branch.
Is it ok to simply
git rebase master
to include F and G commits on the latest foo branch?Can you modify my diagram to show me what my commit history will look like afterward?