今天使用girhub的pages功能搞了一个blog,用了github提供的主题,当我将其git clone
下来的时候,出现:
# On branch master
# 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: fonts/OpenSans-Bold-webfont.eot
# modified: fonts/OpenSans-Bold-webfont.svg
# modified: fonts/OpenSans-Bold-webfont.ttf
# modified: fonts/OpenSans-Bold-webfont.woff
# modified: fonts/OpenSans-BoldItalic-webfont.eot
# modified: fonts/OpenSans-BoldItalic-webfont.svg
# modified: fonts/OpenSans-BoldItalic-webfont.ttf
# modified: fonts/OpenSans-BoldItalic-webfont.woff
# modified: fonts/OpenSans-Italic-webfont.eot
# modified: fonts/OpenSans-Italic-webfont.svg
# modified: fonts/OpenSans-Italic-webfont.ttf
# modified: fonts/OpenSans-Italic-webfont.woff
# modified: fonts/OpenSans-Regular-webfont.eot
# modified: fonts/OpenSans-Regular-webfont.svg
# modified: fonts/OpenSans-Regular-webfont.ttf
# modified: fonts/OpenSans-Regular-webfont.woff
# no changes added to commit (use "git add" and/or "git commit -a")
按理说应该执行git add .
然后接着再git commit -m "messages"
就行了,但是,在我每次要提交的时候,都会出现Changed but not updated:
, git status
时候也总是输出上面的信息,虽说没多大影响,但看了这么多没提交上去的东西真的很不舒服,求解决...
PHPz2017-04-24 16:02:39
Try it git add -A
This directory seems to be related to some fonts. If you don’t care, just git checkout .
试试。git checkout .
it is only valid for files in the current directory. Please change to the correct directory before operating.
習慣沉默2017-04-24 16:02:39
You need to perform the git add
steps first, simply run this command:
git add .
A little explanation: The files that prompt "Changed but not updated" are not added to the Git buffer. If you want to know more clearly, read "Pro Git" or "The Definitive Guide to Git".