Add the mention of push --force-with-lease (#1611)

`--force-with-lease` is safer than `--force` as it checks that you are up-to-date with the remote branch.
This commit is contained in:
Julien Lamandé 2021-02-05 23:26:07 +01:00 committed by GitHub
parent 9148ed237e
commit 6cf3493058
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -95,6 +95,9 @@ git reset --hard
```bash
git reset --hard $commit_id
# Now push to your branch
# Now push safely to your branch
git push --force-with-lease
# Or push brutally to your branch
git push --force
```