2014-08-28 51 views
0

通过错误,我运行命令取消混帐添加-A

git add -A 

,然后(当我想通了),我停止了使用

Ctrl+C 

有没有办法重置库到点前git add -A

git status显示:

# On branch master 
# Your branch is ahead of 'origin/master' by 2 commits. 
# 
# Changed but not updated: 
# (use "git add/rm <file>..." to update what will be committed) 
# (use "git checkout -- <file>..." to discard changes in working directory) 
# 
# deleted: 1xx_xx/xx.m~ 
# modified: 2xx_xx/xx_xx.m 
# deleted: 3xx_xx/xx_xx.m~ 
# modified: 4xx_xx/xx_xx.m 
# 
# Untracked files: 
# (use "git add <file>..." to include in what will be committed) 
# 
# xx_xxvariables_ldac/ 
# xx_xx/variables_ldac_template/ 
no changes added to commit (use "git add" and/or "git commit -a") 
+0

git status现在显示什么? – Vishwanath 2014-08-28 13:51:10

+1

git reset --mixed更多信息http://git-scm.com/docs/git-reset – Vishwanath 2014-08-28 13:52:45

+0

git状态非常慢...它不显示任何东西 – gabboshow 2014-08-28 13:55:25

回答

2

运行git reset --mixed将复位这听起来像你的目标指数。

重置索引而不是工作树(即,保存更改的文件但未标记为提交)并报告尚未更新的内容。这是默认操作。