This repository contains my BibTeX bibliographies, together with instructions for reusing them in other repositories with git-subtree.
Feel free to use them.
To reuse these bibliographies for a paper, managed in a Git repository, add this repository as a subdirectory of the paper repository. You can then use git subtree to propagate changes between the paper repository and the bibliography repository; this setup scales to more paper repositories.
Your paper coauthors can work with you without learning any of this.
Fork this repo, unless you have write access to it.
Let $remote be a Git URL for your fork (for instance,
Run the following bash commands, replacing
$ git remote add bibs $remote $ git fetch bibs $ git subtree add --squash -P Bibs bibs/master
Your editor will be invoked, like for
git commit. Enter a commit message describing the merge operation, for instance:
Integrate bibliographies from github.com/Blaisorblade/Bibs
To fetch updates from the bibliography repo to the paper repo, run from the repository root:
To split and push updates, first pull updates as above, then run from the repository root:
Caveat: If you care about commit messages in your bibliography repo, you need to ask them to have separate commits (with specific commit messages) for the bibliography directory. But this is not technically required: git subtree will remove unrelated changes from commits without problems.
Git subtree was broken in Git 184.108.40.206 and 220.127.116.11, and only fixed in release 1.8.4. Avoid using push or split with a broken
git subtree: otherwise, spurious '-n' will be added to extracted commit messages. Rewinding history in the bibs repo, and running
git fetch bibsin the parent repo will undo the averse effects; repeating the operation with a fixed
git subtreewill not run again in the problem.
Avoid having branches in the bibliography repositories. It seems that git subtree might pick some branch other than master.