Skip to content

Commit bca3f81

Browse files
authored
Merge pull request #15535 from tsuyo/patch-2
Add remote repository to git push commands
2 parents cff3797 + 409b255 commit bca3f81

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

content/pull-requests/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
@@ -53,7 +53,7 @@ We strongly discourage force pushing, since this changes the history of your rep
5353
1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message.
5454
2. Use the `push --force-with-lease` command to force push over the old commit.
5555
```shell
56-
$ git push --force-with-lease <em>example-branch</em>
56+
$ git push --force-with-lease origin <em>example-branch</em>
5757
```
5858

5959
**Changing the message of older or multiple commit messages**
@@ -102,7 +102,7 @@ If you need to amend the message for multiple commits or an older commit, you ca
102102
5. In each resulting commit file, type the new commit message, save the file, and close it.
103103
6. When you're ready to push your changes to GitHub, use the push --force command to force push over the old commit.
104104
```shell
105-
$ git push --force <em>example-branch</em>
105+
$ git push --force origin <em>example-branch</em>
106106
```
107107
108108
For more information on interactive rebase, see "[Interactive mode](https://git-scm.com/docs/git-rebase#_interactive_mode)" in the Git manual.

0 commit comments

Comments
 (0)