0

I have a directory structure which has a lot of result directories that are generated automatically.

How can I set git to ignore those result directories? The issue might be there is no specific rule how the result directory is generated.

prosseek
  • 182,215
  • 215
  • 566
  • 871

2 Answers2

3

An entry like

result/

in a .gitignore file at the repository root should suffice. If your directories are all named dynamically, then consider moving them under one directory, whose name you know - or move generated code completely outside the repo.

CharlesB
  • 86,532
  • 28
  • 194
  • 218
miku
  • 181,842
  • 47
  • 306
  • 310
0

you need to create a file named .gitignore and add the files (or directories) you want git to ignore to it.

but for the gitignore to work, you must add + commit it to your repo.

more info on the file structure here: http://www.git-scm.com/docs/gitignore.html

CharlesB
  • 86,532
  • 28
  • 194
  • 218
xero
  • 4,077
  • 22
  • 39