0

Here the structure of my folders :

  • library
  • Project 1
    • srcs
    • objs
    • lib -> ../library
  • Project 2
    • srcs
    • objs
    • lib -> ../library

As you can see, for all my projects, I use a personal library in the main folder called "library". I have no problem to use it that way for my compilation ... and I have the advantage to keep update the library folder for all my programs without modify each folder inside of each project. Unfortunately, when I save in git hub it doesn't save my files in library. I have a folder with a symbolic link but nothing inside.

How could I do to save the entire folder in my github repo ? I would like to be able, when I download an archive to get the full program with the library inside.

kind regards

1 Answers1

0

See How git handle symbolic links

with that:

Option 1:

Wrap Project 1, Project 2 and library to a wrapping folder and initiate git repository there:

ParentDirectory
  .git
  library
  Project 1
     .git
     src
     objs
     liblink 
  Project 2
     .git
     src
     objs
     liblink 

You can use .gitignore so it will not track Project 1 and Project 2 if you want to maintain the current git files for each project

Option 2:

Initiate git for library

library
   .git
   contents
Project 1
   .git
   src
   objs
   liblink 
Project 2
   .git
   src
   objs
   liblink 
Community
  • 1
  • 1
letthefireflieslive
  • 11,493
  • 11
  • 37
  • 61