Git does not work for me .gitignore

2

Good I have a repository git with this .gitignore

.DS_Store
node_modules/
dist/
npm-debug.log
yarn-error.log
assets/img/file

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln

#Archivos de eclipse
.project
.buildpath
.settings/*

application/cache/*
!application/cache/index.html
/vendor/
application/logs/*
!application/logs/index.html

!application/*/.htaccess

composer.lock

user_guide_src/build/*
user_guide_src/cilexer/build/*
user_guide_src/cilexer/dist/*
user_guide_src/cilexer/pycilexer.egg-info/*


# IDE Files
#-------------------------
/nbproject/
.idea/*

Everything worked fine until I removed some ignored folders to be able to do pull on the quality server but when I returned to the development I added again the folders to be ignored and they did not take it up, uploading them to the git

I have no idea because it does not ignore the folders that you ignore were:

dist/ and /vendor/ but now you continue to take them even if you have them in .gitignore

Is there any command that I have to execute after making a change in .gitignore ?

I hope to make you understand in advance thank you very much.

    
asked by Luis Daniel Rovira Contreras 07.12.2017 в 07:20
source

1 answer

3

I found the solution this command worked perfectly and ignores the files as before

Important to backup before executing the command to avoid losing the changes (commit)

git rm -r --cached .
git add .
git commit -m "fixed untracked files"

I found it in our own community, I hope it helps you

Source

Stackoverflow solution

    
answered by 07.12.2017 в 07:37