Git won't ignore files

后端 未结 1 1981
被撕碎了的回忆
被撕碎了的回忆 2021-01-24 18:11

I have some log files that I want Git to ignore. They are all in:

/Lead Services/logs/

In the .getignore file, I have tried entering all of the

1条回答
  •  粉色の甜心
    2021-01-24 18:32

    You can use git rm to exclude file from tracking permanently. In your local repository, do

    git rm -r --cached logs/*
    

    then

    git add .
    git commit -m "Excluded logs from tracking"
    git push
    

    From now on, the git won't track the logs folder, any more. Also, you may refer to this question.

    0 讨论(0)
提交回复
热议问题