Git: how to use .gitignore

If you start your repo and dont create your .gitignore file before adding files maybe when you create it will not work as you think, to make it work do this after create your .gitignore file:

    git rm -r --cached .
    git add .

At this point your ignored files must be updated and when you commit that will be deleted from your repo, so commit it:

   git commit -m 'gitignore is working now, and remove ignored files'


that is it!

Comentarios

Entradas populares