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
  • 9,923
  • 2
  • 38
  • 39
Tim
  • 1
  • 141
  • 372
  • 590
  • 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
  • 9,923
  • 2
  • 38
  • 39