difference between git ignore and untrack

后端 未结 3 1698
我在风中等你
我在风中等你 2021-02-04 00:03

What\'s the difference between ignore a folder and untrack in git? I need to remove some folders from my git repository and I am working in Netbeans with the git plugins and put

3条回答
  •  感情败类
    2021-02-04 00:58

    If you create a file in your repository named .gitignore, git will use its rules when looking at files to commit. git will not ignore a file that was already tracked (i.e. was in the repo) before a rule was added to this file to ignore it. File must be un-tracked (removed from the repo) using

    git rm --cached filename
    

    The command will stop tracking but keep the file there intact.

提交回复
热议问题