Website Blog

On november 16, 2004, I created the first blog to post some news and comments among my classmates and me. Now, I want to share some small view points with all the people around the world.

How to fix and restore the ignored content in the .gitignore file


If you have this problem, do not worry about it because it's a very common problem when you work with git branches.


First commit any outstanding code changes.


1.- Remove everything from the index:

git rm -r --cached .

2.- Update all the content added into the git index:

git add .

3.- Finally commit your .gitignore file updated:

git commit -m ".gitignore file fixed!"
After follow these steps just take a look at your repository again, then you will notice all the content you wanted to ignore have been already ignored.


No comments available.