.gitignore does not work - the file is not taken into account - Troubleshooting

Last updated November 16, 2022 at 05:29 AM

You make a change in your .gitignore file for your application but it is not taken into account. The solution in this article.

 

It is known that source code versioning is very important in the creation of computer programs. Without software source code management, several errors would be difficult to resolve.

To better understand, versioning software is the log of programmers on a project. It allows you to navigate between versions of the same project to keep it up to date.

 

One of the most commonly used version control software in the world is GIT.

Like any computer program, we encounter unpredictable problems. In our case, it is a problem related to taking into account the files that we want to ignore in our journal.

It looks like the file .gitignore does not work or that our configuration is not taken into account at all. To solve it here is a very simple solution.

 

[bctt tweet=”.gitignore not working – file not supported – Troubleshooting” username=”tedidevblog”]

 

 .gitignore not working – Solution

 

To solve the problem, just delete the git cache using the following command:

 

git rm -r --cached.

The period at the end is part of the script.

 

After deleting the cache, you must make a commit so that your version management software takes your configuration into account. To do this, write the following script:

 

git add. ; git commit -m "updated .gitignore file"

 

This time everything should be back to normal.

 

Last updated November 16, 2022 at 05:29 AM

 

.gitignore does not work - the file is not taken into account - Troubleshooting