I want to completely ignore a part of a git repository. The directory is currently tracked in the repository and I'd like to ensure that
I don't care particularly about the actual contents.
The problem arises with files automatically generated during build. Unfortunately, someone happened to commit them to the repository, but they cause build errors due to different paths etc. when used on different machine than their creator and consequently nasty merge conflicts.
AFAIK, .gitignore
won't work for this purpose, as it only applies to untracked files.
If the file is supposed to never get into the repository, fix the problem and do it correctly...
.gitignore
file.gitignore
And you'll never have to deal with those unwanted files again because .gitignore
will avoid future git add
s of those files (unless --force
d)