Thursday, 3 October 2019

GIT: Ignore(untrack) files to be pushed to git repository

To untrack a single file that has already been added/initialized to your repository, i.e., stop tracking the file but not delete it from your system use: git rm --cached filename


This answer solved my problem:
First of all, commit all pending changes.
Then run this command:
git rm -r --cached .
This removes everything from the index, then just run:
git add .
Commit it:
git commit -m ".gitignore is now working"






No comments:

Post a Comment