使用visual studio online。必须删除文件夹,更新gitignore并提交,然后重新添加文件夹。然后,obj和bin文件夹被忽略。谢谢这正是我需要的修复方法。这也是公认的答案。好极了@HrvojeI也看到了这一点,但这不是Sourcetre

使用visual studio online。必须删除文件夹,更新gitignore并提交,然后重新添加文件夹。然后,obj和bin文件夹被忽略。谢谢这正是我需要的修复方法。这也是公认的答案。好极了@HrvojeI也看到了这一点,但这不是Sourcetre,git,atlassian-sourcetree,sourcetree,Git,Atlassian Sourcetree,Sourcetree,使用visual studio online。必须删除文件夹,更新gitignore并提交,然后重新添加文件夹。然后,obj和bin文件夹被忽略。谢谢这正是我需要的修复方法。这也是公认的答案。好极了@HrvojeI也看到了这一点,但这不是Sourcetree中的一个bug吗?看起来git规范允许。gitignore在root之外? backend/Evaluation/logs/ backend/Evaluation/target/ stackoverflow$ echo this file


使用visual studio online。必须删除文件夹,更新gitignore并提交,然后重新添加文件夹。然后,obj和bin文件夹被忽略。谢谢这正是我需要的修复方法。这也是公认的答案。好极了@HrvojeI也看到了这一点,但这不是Sourcetree中的一个bug吗?看起来git规范允许。gitignore在root之外?
backend/Evaluation/logs/
backend/Evaluation/target/
stackoverflow$ echo this file is important > junkfile
stackoverflow$ git add junkfile
stackoverflow$ git ci -m 'added a file'
stackoverflow$ echo junkfile >> .gitignore
stackoverflow$ git ci -m 'ignore junkfile' .gitignore
stackoverflow$ sed -i 's/ is / is not/' junkfile 
stackoverflow$ git status
# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   junkfile
#
no changes added to commit (use "git add" and/or "git commit -a")
stackoverflow$ git rm --cached junkfile
rm 'junkfile'
stackoverflow$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#   deleted:    junkfile
#
stackoverflow$ git commit -m 'removed junkfile from repository'
[master 19f082a] removed junkfile from repository
 1 file changed, 1 deletion(-)
 delete mode 100644 junkfile
stackoverflow$ git status
# On branch master
nothing to commit, working directory clean
stackoverflow$ cat junkfile 
this file is not important
git rm --cached example.txt
git update-index --assume-unchanged some.file