Ben*_*dEg 71 git git-add
我犯了一个错误并打电话git add -all,现在添加了所有文件.我没有做commit和push.如何撤消我的动作?
git add -all
commit
push
Sim*_*tti 83
已经多次回答:
你可以用git reset.这将"取消"您上次提交后添加的所有文件. 如果您只想取消暂停某些文件,请使用git reset -- <file 1> <file 2> <file n>. 此外,还可以通过使用来取消暂存文件中的某些更改 git reset -p.
你可以用git reset.这将"取消"您上次提交后添加的所有文件.
git reset
如果您只想取消暂停某些文件,请使用git reset -- <file 1> <file 2> <file n>.
git reset -- <file 1> <file 2> <file n>
此外,还可以通过使用来取消暂存文件中的某些更改 git reset -p.
git reset -p
看到
nit*_*gar 10
要重置您可以使用的特定文件:git reset -- <file_a> <file_b>或重置您可以使用的所有更改git reset.
git reset -- <file_a> <file_b>
归档时间:
10 年,10 月 前
查看次数:
69518 次
最近记录:
8 年,5 月 前