tags:

views:

77

answers:

1

If my .gitignore file has tmp\ in it and I do a git add file.test from tmp, Git adds file.test to the repository. If file.test never changes, than this is as good as a one time add to the repository, right? Say for static files that I want to be in version control. You want the file in an initial clone and that's it.

I assume file.test doesn't get tracked, so if there are updates, Git doesn't see it as modified?

+2  A: 

As long as file.test is tracked (added and committed), it will show even if it should be ignored by the .gitignore file.

That means you could still update that file and it will still show up in the git status report.

See the ".gitignore File not ignoring" SO question.


One possible way to achieve the kind of static content you are after would be through a smudge-clean attribute filter driver

alt text

The smudge step would do nothing, but the clean script would systematically restore the file to its original content (untouched), meaning that any local modification would not be recorded during the commit.

VonC