You are not logged in.
Hi All,
I have one central repository with C subroutines that I use in micro controllers.
Then I make a new repository for each new project, and link to the above repository as a git submodule. The cool thing is that all projects I have can use the latest and greatest versions of the files in the central repository, the downside is that there's a lot of files in the working copy that are not used.
For example I have this in my central repository: A.c A.h B.c, B.h C.c C.h and so on.
In one project I only need projectOne.c and A.c and A.h
In the other project I have projectTwo.c and C.c and C.h.
When I want to publish projectTwo, I make a new repository, copy over projectTwo.c and C.c and C.h into a new git repository, and publish that. This way the history of all the files is lost.
Is there a way to prevent the loss of the history of the files?
Cheers,
Cedric
Offline
I don't know the exact answer to your question, but could git-sparse-checkout help you with your underlying problem?
Offline
Just use one repository. As you start each project then create a new projectXXX branch and git rm the files you don't want there. There are a few advantages doing it this way. You can easily git merge project fixes and/enhancements back to your master branch, and or, to another project branch. You can rebase the entire project easily to a later master, etc.
Offline