git修改已提交的commit
This commit is contained in:
parent
610cfa3c90
commit
13032e104a
13
git 修改已提交的commit.md
Normal file
13
git 修改已提交的commit.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# git 修改已提交的commit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git rebase -i HEAD~1 #修改commit HEAD~1为commit的数量
|
||||||
|
#在打开的文件中将需要修改的commit前的pick改为edit,并保存关闭文件
|
||||||
|
|
||||||
|
git commit --amend #修改commit内容
|
||||||
|
git rebase --continue #完成内容修改
|
||||||
|
git push --force origin #强制提交
|
||||||
|
```
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user