git之修改上次提交备注

1.修改上次提交的备注

$ git log --stat -2
commit bd05a0bdb88cf7eb4c10b084ada2121990561097
Author: yinnana 
Date:   Sun Jan 8 12:23:22 2017 +0800

    doc commit

 ...6\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

commit fece0beb413478122dbe4e2dcbb38469d51cee55
Author: yinnana 
Date:   Sun Jan 8 11:42:26 2017 +0800

    偷懒了,直接使用-a参数直接提交

 src/yin.do | 1 +
 1 file changed, 1 insertion(+)
$ git commit --amend -m "remove previous update"
[master a1b70b4] remove previous update
 Date: Sun Jan 8 12:23:22 2017 +0800
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 "doc/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt"
$ git log --stat -2
commit a1b70b4d6dcbfdb49fe463c5957b6d95ab2240fc
Author: yinnana 
Date:   Sun Jan 8 12:23:22 2017 +0800

    remove previous update

 ...6\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

commit fece0beb413478122dbe4e2dcbb38469d51cee55
Author: yinnana 
Date:   Sun Jan 8 11:42:26 2017 +0800

    偷懒了,直接使用-a参数直接提交

 src/yin.do | 1 +
 1 file changed, 1 insertion(+)




你可能感兴趣的:(Git)