Hi,
I'm a software engineer by trade and have been using git for software development for quite some time.
Let me first start saying that there are *many* different possible workflows, and each user needs to come up with their own workflow that they're comfortable with.
With respect to branching, the most important thing to remember is that your *local* branches need to be ever pushed to the "origin" repository. Or, to put this in layman's terms: You can create many branches locally, work through all your possible changes and experiments, and then when you have something that you like, "squash" (which is a "git rebase") all that work into a single commit that you push that to your origin repository. This technique avoids the issues that H.S. Teoh was talking about having a polluted git history.
In software, we generally avoid multiple repositories, and stick to "one giant repository" and use branching and tagging for releases and milestones.
For LilyPond development, I would think that there are some imortant questions to ask first.
- Is there any shared code at all between different scores? I can imagine that you may have some utility functions, layout helpers, etc. that you share across many scores. If you share code like this, then one repository will be easier.
- Are you collaborating, and how? How well versed in git are your collaborators?
Again, it software, the flow most people use are:
- Make many local branches that no one else ever sees. "git commit" to these branches very frequently.
- When you have something that "looks good" in a local branch, rebase it into a single commit using "git rebase -i"
- Allow collaborators to view this rebase'd "final version" of your work. This could be by pushing to a "dev branch", or by sending a diff via e-mail. Your choice.
- After review is complete, either "merge dev branch into HEAD" or "apply patch that was the result of new work" (per step(s) above)
There are lots of good websites outlining possible workflows, and it'll take some time and experimentation to get things right. Take a look at:
and
I also agree 100% with H.S. Teoh when it comes to "private repository" versus "self-hosted repository"
If you want something cheap & easy, just put your "private" git repositories on dropbox. That way, you can collaborate with others by sharing the dropbox folder (read only or read/write as you see fit). There's no need to use a private github repository unless you really want to collaborate with lots of people, or you want to invite collaborators that you don't know personally (i.e. the forking flow that requires a code review to publish)
Good luck and I'm happy to answer more git questions if you ever have some. :)
Steve