什么"改变但没有更新意味着什么"?这些文件是git,它们已被修改,但是当我运行"git status"时,这些更改显示在"已更改但未更新"下,而不是"要提交的更改".
# 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#
Run Code Online (Sandbox Code Playgroud)
既然他们已经被添加,他们为什么不"改变承诺"?
Kit*_*YMG 24
你必须使用git add每次或使用git commit -a或git commit --all平原代替git commit.
来自Git文档:
-a --all Tell the command to automatically stage files that have been modified and deleted, but new files you have not told git about are not affected.
add基本上是"注意这个文件/目录"命令.不是CVS或subversion的跟踪更改此文件.
| 归档时间: |
|
| 查看次数: |
17634 次 |
| 最近记录: |