「更改但未更新的意思」是什麼?這些文件在git中,它們已被修改,但是當我運行「git status」時,這些更改顯示在「已更改但未更新」下,而不是「要提交的更改」。Git:文件「已更改但未更新」
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: breakouts/views.py
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: templates/registration/login.html
# modified: templates/registration/registration.html
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# context_processors.py
# static/#css.css#
既然他們已經被添加了,爲什麼他們不是「承諾的變化」?
`git add`的關鍵思想是你準備一個提交,是你將修改放入臨時區域(索引),然後一旦你完成了你想提交的內容,就提交它。這可以讓你非常小心任何給定提交的內容。 – Cascabel 2011-01-27 06:24:27