0

I have a dir project containing directories .git, src, data and other subdirs. How can I stop sharing data (i.e. stop including data in the repository, and letting it appearing in other git repositories), while still sharing src and other subdirs?

Shall I move data out of project?

Thanks.

svlasov
  • 8,802
  • 2
  • 36
  • 38
Tim
  • 88,294
  • 128
  • 338
  • 543
  • possible duplicate of [Stop tracking and ignore changes to a file in Git](http://stackoverflow.com/questions/936249/stop-tracking-and-ignore-changes-to-a-file-in-git) – dimo414 Mar 27 '15 at 15:27

1 Answers1

2

To stop tracking data dir:

git rm -r --cached data

UPDATE

As @MykolaGurov mentioned, you may also add data dir to .gitignore.

echo 'data' >> .gitignore
svlasov
  • 8,802
  • 2
  • 36
  • 38