Skip to content

Commit 34d66ec

Browse files
authored
Merge pull request github#6805 from yeikel/patch-1
Suggest users to use --force-with-lease instead of --force
2 parents 9f30dfc + b7c020b commit 34d66ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ We strongly discourage force pushing, since this changes the history of your rep
4949
**Changing the message of the most recently pushed commit**
5050

5151
1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message.
52-
2. Use the `push --force` command to force push over the old commit.
52+
2. Use the `push --force-with-lease` command to force push over the old commit.
5353
```shell
54-
$ git push --force <em>example-branch</em>
54+
$ git push --force-with-lease <em>example-branch</em>
5555
```
5656

5757
**Changing the message of older or multiple commit messages**

0 commit comments

Comments
 (0)