Skip to main content

Working with .gitignore file

Examples of .gitignore file usage.

Fixing directory still in repository after adding it to .gitignore

Supposing that a directory has been added to the repository and pushed to the remote. If you add this directory to .gitignore and push your changes, you will see that this directory is still present in the remote repository. In order to remove it, execute:

git rm -r --cached <directory_name>

and push your changes again.