Home » How to update .gitignore file

How to update .gitignore file

Let’s start the discussion about How to update .gitignore file in following methods.


git update .gitignore

When you run the git add command after establishing a .gitignore file in your repository and setting patterns to match files that you do not want Git to track, Git begins tracking repository files and obeying the patterns set in the .gitignore file.

git rm -r --cached .
git add .
git commit -m "updated gitignore"

It is necessary to clear the git cache. I normally just use git rm -r —cached to accomplish this. After that, I run the git add. command to apply the .gitignore changes.

I hope the strategies listed above work for you. Happy coding and come back again.

Similar Post : how to uninstall react native cli globally