git rm -r --cached . git add . git commit -m "fixing .gitignore". Found the answer from here.
Then commit the file with -am then the file gets updated and then the file cannot be tracked. .gitignore will prevent untracked files from being ...
which is for modified tracked files that the user don't want to commit anymore and ...
Ignore files across all repos on your system; Ignore changes to committed files. Use gitignore to prevent tracking of files. Create a .gitignore file in ...
... that's the job of the .gitignore file. You can also stop tracking files in Git that have already been committed, but with a little bit more work.
This deletes the file, and tells Mercurial to stop tracking it (which will occur at the next commit). A removed file is represented in the output of hg status with a “ R ”.
Git “remove” FAQ: How do I tell Git not to track a file (or files) any more?
Selecting Ignore and Stop Tracking will add the corresponding entry to the .gitignore file ...
Lesson goal: learn how to stop tracking and remove files from future commits. Git commands: git rm to delete and stop tracking a file; git rm --cached to only stop ...
Step 1: Commit all your changes. Before proceeding, make sure all your changes are committed, including your .gitignore file. Step 2: Remove ...