Mittwoch, 30. Juni 2010

Git ignore already added files

dear world,

I wanted git to ignore files that I have already added to the repository. Unfortunately, if a file was added, changing .gitignore does not help. But there are two options:

  • git update-index --assume-unchanged [filename(s)]
  • git update-index --skip-worktree [path_to_ignore]
the first tells git to ignore changes to single files;
the second tells it to ignore all files below a given path .. a complete directory.

so far this works and I hope I did not mess something up.



Keine Kommentare: