เมื่อฉันทำ a 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)
อย่างที่คุณเห็นไม่มีอะไรอื่นนอกจากสี่ไฟล์ที่มีการเปลี่ยนแปลงที่นำไปใช้
คำถามของฉันควรได้รับการเรียบเรียงใหม่ดังนี้เหตุใดคอมไพล์จึงเตือนฉันเกี่ยวกับไฟล์ที่ไม่ได้ติดตามเมื่อมีการติดตามการเปลี่ยนแปลงทั้งหมดในคอมมิตนี้
กล่าวอีกนัยหนึ่งคำเตือนที่ไม่ได้รับการติดตามในข้อความคอมมิตไม่จำเป็นหรือไม่ ?
(use "git add <file>..." to include in what will be committed)