2014-08-28 78 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將復位這聽起來像你的目標指數。

重置索引而不是工作樹(即,保存更改的文件但未標記爲提交)並報告尚未更新的內容。這是默認操作。