mirror of
https://github.com/git-tips/tips.git
synced 2024-09-21 00:01:03 +02:00
Describe how to reword the most recent commit message
This is useful for when you realize that you forgot to mention something important, made a typo, etc. Obviously you should avoid using this on a commit which you have already pushed. Signed-off-by: Eric James Michael Ritz <ejmr@plutono.com>
This commit is contained in:
parent
76c268f284
commit
3e926cdc9e
|
@ -19,6 +19,7 @@
|
||||||
* [Delete local branch](https://github.com/git-tips/tips#delete-local-branch)
|
* [Delete local branch](https://github.com/git-tips/tips#delete-local-branch)
|
||||||
* [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
|
* [Delete remote branch](https://github.com/git-tips/tips#delete-remote-branch)
|
||||||
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
|
* [Undo local changes with the last content in head](https://github.com/git-tips/tips#undo-local-changes-with-the-last-content-in-head)
|
||||||
|
* [Reword the previous commit message](https://github.com/git-tips/tips#reword-the-previous-commit-message)
|
||||||
* [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
|
* [Changing a remote's URL](https://github.com/git-tips/tips#changing-a-remotes-url)
|
||||||
* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
|
* [Get list of all remote references](https://github.com/git-tips/tips#get-list-of-all-remote-references)
|
||||||
* [Get list of all local and remote branches](https://github.com/git-tips/tips#get-list-of-all-local-and-remote-branches)
|
* [Get list of all local and remote branches](https://github.com/git-tips/tips#get-list-of-all-local-and-remote-branches)
|
||||||
|
@ -130,6 +131,11 @@ git push origin :<remote_branchname>
|
||||||
git checkout -- <file_name>
|
git checkout -- <file_name>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Reword the previous commit message
|
||||||
|
```sh
|
||||||
|
git commit -v --amend
|
||||||
|
```
|
||||||
|
|
||||||
## Changing a remote's URL
|
## Changing a remote's URL
|
||||||
```sh
|
```sh
|
||||||
git remote set-url origin <URL>
|
git remote set-url origin <URL>
|
||||||
|
|
|
@ -64,6 +64,10 @@
|
||||||
"title": "Undo local changes with the last content in head",
|
"title": "Undo local changes with the last content in head",
|
||||||
"tip": "git checkout -- <file_name>"
|
"tip": "git checkout -- <file_name>"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"title": "Reword the previous commit message",
|
||||||
|
"tip": "git commit -v --amend"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"title": "Changing a remote's URL",
|
"title": "Changing a remote's URL",
|
||||||
"tip": "git remote set-url origin <URL>"
|
"tip": "git remote set-url origin <URL>"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user