views:

119

answers:

3

In almost all of my projects I have few files that are "project wide" in the sense that their contents should be shared across all branches. These files usually include project schedules, to-do lists, wikis, and the like. Currently I have them included .gitignore so that they are not versioned but remain the same no matter what branch I have checked out. However I'd really love to have them versioned in a way that is "orthogonal" to the versioning of the source code. Is this possible with git without too much pain?

A: 

Can't you just have one universal/project wide branch, then a bunch of project branches?

Matthew Flaschen
+2  A: 

You could have those files (wiki, todo and so forth) in their dedicated Git repository, and then add them to a development repository through the subtree merge strategy (as described in this question).

That way, they get included in any development, and they also get updated by those sub-projects.

Any modification in a branch doen by a sub-project can then be merged back in a "main" branch in the original "wiki" Git repository, and all sub-projects can merge their own development branch with that main "wiki" branch in order to update this content included through a subtree merge.

Not exactly an "orthogonal" versionning, but still a practical solution.

VonC
I have to try this in practice but this seems to be precisely what I was looking for.
pico
+1  A: 

I usually prefer to use a separate tool for scheduling, issue tracking, wiki docs etc. For example, Trac provides such features and integrates nicely with a git backend. Source control is used only for, well, source control.

If you want to use a source control tool for storing project management data, consider having separate projects in the source control for "management" and "implementation".

laalto
I guess it depends a lot on the context and I would really hate it if the issues in the email system we use, for example, were managed through source code comments littered with to-dos. However I personally work in small projects of two or three developers in scientific domain. We like to keep all things small and compact so that everything can be done with Vim or Emacs and an USB stick can serve as master repo. Many thanks for your views.
pico