I have 5 files that I want to ignore in git on my test server. I updated my git ignore file to include them but I still get an error saying "You local changes to the following files would be overwritten by checkout" and am unable to proceed with the checkout. I am on the server and see the .gitignore file as been updated. The error lists the problematic files under the error message:
path\to\file_a
path\to\file_b
path\to\file_c
path\to\file_d
path\to\file_e
My .gitignore file looks like the below:
# Directories #
###############
# Ignore everything:
/*
# Except for the web, database, and company web directories:
!web/
!database/
!cron/
!includes/
!.gitignore
# But still ignore these directories and files:
path/to/file_a
path/to/file_b
path/to/file_c
path/to/file_d
path/to/file_e
I believe I should not get the git error because I have listed the files in the .gitignore
I did the rm --cahced path\to\file method and that did not work enter image description here