You have a repo and quite some developers have cloned the repo and working on it. Now you want to add a file to gitignore which is already checked-in or tracked by Git.(The file is already commited into the repo)
Below are the steps on how to ignore this file (lets say the filename is config.py
):
-
Add it to
.gitignore
:
$ echo "config.py" >> .gitignore