Files
freeCodeCamp/guide/chinese/miscellaneous/how-to-undo-a-git-add/index.md
2018-10-16 21:32:40 +05:30

13 lines
398 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: How to Undo a Git Add
localeTitle: 如何撤消Git添加
---
# 撤消git add
在提交之前撤消`git add`
运行`git reset <file>``git reset`以取消所有更改。
在旧版本的git中命令分别是`git reset HEAD <file>``git reset HEAD` 。这在Git 1.8.2中有所改变
[资源](http://stackoverflow.com/questions/348170/undo-git-add-before-commit/348234#348234)