Git recommendation for library management?

FastLED has a primary repository at http://github.com/FastLED/FastLED - the top level of this repository is the library header/source files. For most platforms people can just clone this archive directly into their libraries folder.

SparkCore requires all the library code to be in a subdirectory named firmware - which means, obviously, that the library’s primary git repo can’t be used for the spark core. I did some digging around and couldn’t find a good way with git to have another repository setup, with a firmware directory that has the contents of my main library repo in it that would allow me to easily push/pull changes from the main repository. Right now, I’m having to copy files over by hand from a checkout of the main repository. Unfortunately this means that any changes I make in the spark core version of the repository have to be copied back manually if I want to keep the two sets of code in sync.

Suggestions for a better mechanism for managing this? (Unless Spark is likely to remove the requirement for the library to be in a subdirectory off of the root of the repo - which would let me use the main repo for all the platforms I develop for).

@dgarcia, it would be nice to not open so many threads for issues pertaining to the same thing that you are working on. Makes it really hard to answer and track! :wink:

I actually try to isolate the threads to specific issues each. All of them are under the umbrella of maintaining a complex library under active development that supports the spark core as one of many platforms, to be sure. However, the relatively flat nature of the community boards here would make following a half dozen threads about different types of issues annoying/frustrating.

(Some of these I’m likely to move to the various github issue trackers for various parts of the spark core project. I suspect as I continue to do work with the platform I’m going to continue finding issues related to library management/development).

1 Like

If you want some cross-referencing of your threads, you might consider adding links to all of them in each individual thread in the initial post.

This way Discourse will add these links to the summary block at the bottom of the first post and on the right side of the post where the linke was provided a follow up indicator will be set, too.

You can use git subtrees - this allows you to import the content of another repo under a given directory in your repo (e.g. pull a remote library repo under a “firmware” directory).

You’ll have to manage pulls from the subtree repo by hand, but it’s a nice solution. Using SourceTree makes the process even simpler.

http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/

1 Like