This commit is contained in:
Nicolas Dermine 2017-11-19 18:56:42 +01:00 committed by Richard Littauer
parent 2e5498cd5c
commit 9dafe52a63
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ Note that, as with rebasing (see below), amending **replaces the old commit with
(my-branch)$ git push origin mybranch --force-with-lease
```
In general, **avoid force pushing**. It is best to create and push a new commit rather than force-pushing the amended commit as it has will cause conflicts in the source history for any other developer who has interacted with the branch in question or any child branches. `--force-with-lease` will still fail, if someone else was also working on the same branch as you, and your push would overwrite those changes.
In general, **avoid force pushing**. It is best to create and push a new commit rather than force-pushing the amended commit as it will cause conflicts in the source history for any other developer who has interacted with the branch in question or any child branches. `--force-with-lease` will still fail, if someone else was also working on the same branch as you, and your push would overwrite those changes.
If you are *absolutely* sure that nobody is working on the same branch or you want to update the tip of the branch *unconditionally*, you can use `--force` (`-f`), but this should be avoided in general.