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
  • 169,389
  • 197
  • 542
  • 840

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
  • 80,832
  • 27
  • 184
  • 208
miku
  • 172,072
  • 46
  • 300
  • 307
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
  • 80,832
  • 27
  • 184
  • 208
xero
  • 3,870
  • 20
  • 39