The git documentation mentions in several places not to rebase if the code has been pushed to a public repository. This would be a simple rule to follow if every operation which performed a rebase had the rebase
command in it:
$ git rebase foobar
However, I have seen it mentioned that other commands (i.e. reset
) may also perform a rebase behind the scenes. Thus, the "thall shall not rebase" rule becomes much harder to follow as the user might not know that the command that he is running will include a rebase.
How can the user know which commands perform rebases, in order to avoid them?
Edit: Here is an example of an action which, even given the accepted answer, is not clear if it is a rebase or not.