I have read the answers to this this question and just wanted to make sure that I understand correctly. So, if I add a new line in .gitignore to make GIT ignore some folder with a lot of files, that were already added in a previous commit, I can do this:
git rm --cached path_to_folder
This will remove the folder from the git repo, but won't remove the physical folder in my local computer. If I then commit and push this to my github repo, and then go to my remote web server and do a git pull, I would first need to backup the folder on the web server?
Because it will get deleted? I can then restore the missing folder on the web server without worrying about it getting deleted the next time I do a git pull?