Skip to content

Commit

Permalink
Merge pull request github#15535 from tsuyo/patch-2
Browse files Browse the repository at this point in the history
Add remote repository to git push commands
  • Loading branch information
vgrl authored Mar 2, 2022
2 parents cff3797 + 409b255 commit bca3f81
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ We strongly discourage force pushing, since this changes the history of your rep
1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message.
2. Use the `push --force-with-lease` command to force push over the old commit.
```shell
$ git push --force-with-lease <em>example-branch</em>
$ git push --force-with-lease origin <em>example-branch</em>
```

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

0 comments on commit bca3f81

Please sign in to comment.