0

I have a big iOS app that include messaging functionality and many other stuff. Now I want to create another app with only messages. How can I set git to track common files? I think submodules can help me, but I have already git repository for 1st app and continue support it, but I don't want add as submodule the whole app in the 2nd. I want to avoid same changes in the same files during development.

I found this https://help.github.com/articles/splitting-a-subfolder-out-into-a-new-repository/ It can create new repo from subfolder, but actually i have different folders and is it possible to track without changing 1st app repo?

Ivan Vavilov
  • 1,520
  • 1
  • 15
  • 28
  • i think this question is already answered here: http://stackoverflow.com/questions/8442818/fork-file-from-git-repo-without-cloning-the-repo –  Oct 10 '14 at 10:08
  • @oPi I don't want to fork. I want track changes in two projects. If possible, I want to avoid create new repo from subfolder. Also I have files in different folders. – Ivan Vavilov Oct 10 '14 at 10:34
  • so, what you want is download a few files from two different projects? –  Oct 10 '14 at 10:43
  • @oPi No. Now I have one app. I want create second app with some files from 1st app. But I don't want fork, I want tracking(logging) changes these files from two apps. And if it's possible I want to avoid 1st app git repo changes(create submode for instance). – Ivan Vavilov Oct 10 '14 at 10:47
  • @IvanVavilov, by far the easiest approach is to put your common files into a subdirectory, ideally making a library out of them. Then you can use this "messaging library" in both applications. I'm not an Objective-C developer, so I don't know the details of doing this in that language. After this first step, you've got some options (e.g. submodules, subtrees, ...) – ChrisGPT was on strike Oct 10 '14 at 11:35
  • @Chris ok, thanks. I think it's the best solution – Ivan Vavilov Oct 10 '14 at 12:00

0 Answers0