I have a project with Ruby on Rails and local files, images in this case, are stored in the path /public/system
. I included that line in .gitignore
but every time I push changes to the remote repository the images are uploaded to github anyway.
Why?
I just want this folder and its content not to be uploaded to github, but I do want to keep the files in my local repo.
This is my .gitignore
file, it's just the default content, I added the last line:
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp
/public/system