1
0
mirror of https://github.com/k88hudson/git-flight-rules.git synced 2025-06-17 05:21:35 -03:00

Fix option to amend commit message (#255)

This commit is contained in:
cyblue9
2018-11-15 08:28:28 +09:00
committed by Richard Littauer
parent 20e4b2c10d
commit f4037ec5c1
3 changed files with 6 additions and 6 deletions

View File

@ -110,12 +110,12 @@ $ git log -n1 -p
如果你的提交信息(commit message)写错了且这次提交(commit)还没有推(push), 你可以通过下面的方法来修改提交信息(commit message):
```sh
$ git commit --amend
$ git commit --amend --only
```
这会打开你的默认编辑器, 在这里你可以编辑信息. 另一方面, 你也可以用一条命令一次完成:
```sh
$ git commit --amend -m 'xxxxxxx'
$ git commit --amend --only -m 'xxxxxxx'
```
如果你已经推(push)了这次提交(commit), 你可以修改这次提交(commit)然后强推(force push), 但是不推荐这么做。