gitignore not removing files

This question already has an answer here:

  • Ignore files that have already been committed to a Git repository [duplicate] 21 answers
  • Telling git to ignore symlinks 6 answers

  • 你可以尝试下面的命令,

    git rm --cached 
    git add . 
    git commit -m "refreshed ignored files."
    

    .gitignore does not remove files that are already tracked but instead affects which files will be tracked by default when git add is run. After ignoring some files with .gitignore, you may want to run git rm --cached on files that are already tracked.


    the symlinks have to be removed and committed first.

    step 1: add the gitignore
    step 2: delete all the symlinks
    step 3: commit/push
    

    from now on, they won't appear

    链接地址: http://www.djcxy.com/p/23404.html

    上一篇: 无法将文件夹添加到gitignore文件

    下一篇: gitignore不删除文件