Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Suppose the project looks like this when clean:

  README.txt
  src/
  include/
  doc/
  TODO.oo3
In the midst of development, I may end up with files in some of these directories that are not supposed to go into the repository. There may be output files from test runs that I'm keeping around temporarily while I debug, notes (that will be incorporated into commit messages which is why the notes files do not belong in the repository), short-lived alternative versions of some of the source or include files, and so on.

I don't want to "git add" on the project directory, or any of the subdirectories other than TODO.oo3 because I don't want to pick up those files. For everywhere except TODO.oo3, "git add -u" is what I (think I) want. It's only with TODO.oo3 that I want "git add" instead of (or in addition to) "git add -u".



That's what the .gitignore file is for, or if you don't want/need to change that between other users of the repositor, the .git/info/excludes file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: