1

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 these:

/Lead Services/logs
/Lead Services/logs/
/Lead Services/logs/*
/Lead Services/logs/**

I've even tried to enter specific files:

/Lead Services/logs/LeadAcceptance-LocalDev.txt

No matter what I try, these files keep showing up in Team Explorer under "Changes". What am I doing wrong?

Casey Crookston
  • 13,016
  • 24
  • 107
  • 193
  • Possible duplicate of [Stop tracking and ignore changes to a file in Git](http://stackoverflow.com/questions/936249/stop-tracking-and-ignore-changes-to-a-file-in-git) – 1615903 Jan 29 '16 at 05:52

1 Answers1

0

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.

Community
  • 1
  • 1
Farhad
  • 12,178
  • 5
  • 32
  • 60