Andrew
Andrew

Reputation: 85

Keeping lilypond scores separate from each other in Git

I compose and arrange music as a hobby, using Sibelius for initial drafting and producing audio and Lilypond for typesetting final copies. Being source code, I put my prints under version control. Note that I'm fairly inexperienced with Git beyond branching and merging, etc.

I have all my scores in a directory structure like this:

scores/
| -- some_score/
|    | -- Makefile (makes/updates all PDFs)
|    | -- src/
|    |    | -- (all the ly files)
|    | -- prints/
|    |    | -- (all the PDFs)
| -- other_score/ (similar structure)

etc...

I ran git init in the root dir, and I would work on each score separately in its own (score_title)-dev branch, pushing to master once I had a printable draft, say, for each part. As I've been jumping between projects, though, I've found that merging the dev branches into master gets messy.

I read a little about submodules and have considered it; I also read a bit about subtrees, but those made even less sense to me. Is there a clean way to manage all this? Do I just need to revise how I work with my branches?

Upvotes: 1

Views: 119

Answers (1)

harmonica141
harmonica141

Reputation: 1469

You are running into these issues because you are slightly abusing git as Dropbox: Having all projects in one repository leads to messing up merges at some point in time.

Better approach: Use one repository per score. Private repos are free on Github nowadays so there would be no increased cost factor and every project could have a clean commit history on its own.

Submodules should not be used here as they serve an entirely different purpose.

Upvotes: 2

Related Questions