.gitignoreGit에서 내 파일을 무시한 것 같습니다. .gitignore파일이 손상 되었을 수 있습니까? Git은 어떤 파일 형식, 로케일 또는 문화를 기대합니까?
내 .gitignore:
# This is a comment
debug.log
nbproject/
출력 git status:
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# debug.log
# nbproject/
nothing added to commit but untracked files present (use "git add" to track)
내가 좋아하는 것 debug.log및 nbproject/비 추적 파일 목록에 표시되지.
이 문제를 해결하기 위해 어디에서 시작해야합니까?
echo "file" > .gitignorePowerShell에서 사용 했는데 파일에 UCS-2 인코딩이있었습니다!
git rm --cached debug.log nbproject/
.gitignore파일을 사용ANSI하거나UTF-8인코딩 해야합니다 . 와 같은 다른 것을 사용Unicode BOM하면 Git이 파일을 읽을 수 없습니다.