1

I have 3 project folders that share some of the source code with each other. Whenever I update these files, I have to go on each of these 3 folders to update the corresponding source code file. This is quite cumbersome, and problematic, as I have to remember which of the files are shared as well.

I tried to hard link these script files (ln source destination) on MacOs which worked; whenever I update a linked source code file in one folder, it would automatically update the corresponding files in the other folders. However, what I don't like with this approach is that there is no way to tell what scripts are linked. Using terminal each time I want to introduce shared scripts is not very scalable either.

I use VS Code and recently got introduced to Git/Github. I'm still very novice at both and I'm wondering if they have some features that can solve my problem?

This is the only similar question I found which I find puzzling. Why aren't more people having this problem or am I searching the wrong terms?

Ming
  • 744
  • 4
  • 13
  • 26
  • copy/pasting code accross projects is often the sign that a common library would be useful. What programming language(s) do you use in these projects ? – LeGEC Jul 20 '20 at 21:10
  • Lua. Because it's used in a game engine, the source code can be in different folders. So I don't think a common library would work? – Ming Jul 20 '20 at 22:21

0 Answers0