I had a file I needed to edit in my .gitignore file.
I edited .gitignore, committed it, and still my file was unavailable to commit.
I deleted the file, readded it, and once it has the same name, its still unavailable to commit.
I tried -f, which then added an empty version of the file to my repository. And the worst apart about that is that if I deployed, it would break my entire application at this point.
Update:
The file I want to add is :
public/javascripts/ckeditor/config.js
my .gitignore file says :
public/stylesheets/*.css
*.swp
*.pid
.idea
config/database.yml
log/*.log
db/*.sqlite3
tmp/**/*
doc/api
doc/app
doc/plugins
public/system/*
coverage.data
coverage/*
.DS_STORE
.DS_Store
solr/data/**/*
solr/pids/**/*
config/initializers/mail_delivery_override.rb
Git status reveals this :
# On branch testing
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: public/javascripts/ckcustom.js
#
no changes added to commit (use "git add" and/or "git commit -a")
That ckcustom.js is a compiled file form the ckeditor suite that is made by other changes. But I can't just edit that file, I had to edit its inner workings.