当执行时git commit -a,我看到以下内容:
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch better_tag_show
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: ../assets/stylesheets/application.css
# modified: ../views/pages/home.html.erb
# modified: ../views/tags/show.html.erb
# modified: ../../db/seeds.rb
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../assets/stylesheets/
# ../views/pages/
这些未跟踪的文件是什么意思?确实已跟踪所有更改。我不明白为什么git在这里警告我有关未跟踪文件的问题。
编辑:
好的,我看到很多困惑的答复。这就是我之后发生的事情git commit -a。
# On branch master
nothing to commit (working directory clean)
如您所见,除了已应用更改的这四个文件之外,没有其他任何东西。
我的问题应改写为:当此提交中的所有更改都已被跟踪时,为什么git为什么警告我有关未跟踪的文件?
换句话说,git commit消息中的未跟踪警告是否不必要?
(use "git add <file>..." to include in what will be committed)