每次我在分支之間切換時,都會出錯。在分支之間切換會給我錯誤
我這個做了幾次:
https://help.github.com/articles/dealing-with-line-endings
git rm --cached -r .
# Remove everything from the index.
git reset --hard
# Write both the index and working directory from git's database.
git add .
# Prepare to make a commit by staging all the files that will get normalized.
# This is your chance to inspect which files were never normalized. You should
# get lots of messages like: "warning: CRLF will be replaced by LF in file."
git commit -m "Normalize line endings"
# Commit
和問題仍然存在。
我.gitattribute文件看起來像這樣:
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto
# Explicitly declare text files we want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
我得到的錯誤:
「錯誤:您當地的下列文件中的更改會被檢出覆蓋:」
它被列爲文件夾中的下列文件? 'git add .'只會添加git在直接文件夾中追蹤的文件,而不是子文件夾。 – simont 2013-04-05 09:37:43
是的,這是正確的:o那麼我該如何解決這個問題? – Muqito 2013-04-05 09:38:48
我想規範整個項目 – Muqito 2013-04-05 09:39:15