Publish from a mono-repository

Author(s): Jose F. Morales.

This tool allows publishing pristine views of an annotated git mono-repository. An annotated git repository contains NODISTRIBUTE empty files that mark directories that must not be visible in a pristine copy.

This tool is tailored for the ciao-devel mono-repository but it could be easily generalized for other repositories.


Use ciao publish list to list publishable bundles from the Ciao devel repository (either the main ciao or some bundles at bndls/). E.g.:

$ ciao publish list

Publishing code is performed by the commit and push operations. Use the help option to view other possible commmands.

Example for publishing the bundle at the current directory (when run at the Ciao root directory the special ciao bundle is selected, which contains core and builder):

$ ciao publish pull
$ ciao publish commit
<< (please review commits) >>
$ ciao publish push

A command may be followed by a target bundle name to specify a different bundle. Example for publishing ciao_emacs:

$ ciao publish pull ciao_emacs
$ ciao publish commit ciao_emacs
<< (please review commits) >>
$ ciao publish push ciao_emacs

The first time that commit is performed, it will require a first commit number. This is not needed for squash.

You can use the --all option to perform a command on all publishable bundles (see --help for more info), or use shell scripts.

Examples on all bundles:

<< Consult the status of all publishable bundles >>
$ ciao publish status --all

<< Pull all public repositories (previous to publishing) >>
$ ciao publish pull --all

<< Commit all publishable changes >>
$ ciao publish commit --all

<< Push to the public repository >>
$ ciao publish push --all

  • The source is fetched from the repository (not from the checkout).
  • Clones of publishing repos are kept at $HOME/REPOS-ciao-publish (with some metadata to speedup detection of unpublished commits).

Additional files for publishing

Other directories:

ci-scripts/      Scripts for CI
ci-status/       Scripts for checking the status of CI
                 Download statistics

Contribution from public repositories

Assume that Bob maintains the private Ciao repository and Alice wants to contribute to it. This is the typical workflow for contributing to the project preserving authorship:

  • Alice: clone public Git repository (
  • Alice: make some changes and commit them
  • Alice: format patches using git format-patch (never push them!)
    $ git format-patch HEAD^n # where n is the number of commits not in master
  • Alice: send the ????-*.patch files via email to Bob
  • Bob: apply back the changes in the private repository with

    $ git am < 0001-*.patch
    $ git am < 0002-*.patch
    $ ...

  • Bob: check with git log that the code is pushed correctly
  • Bob: do ciao publish pull, ciao publish commit, and ciao publish push

  • Alice: do git pull and git rebase -i. The first command will create a merge commit. The second command will break. After some git rebase --continue it will end. If everything is fine there will be no unpushed changes to master and all new commits will be authored as Alice.

Merging github pull requests

You can follow the same steps as in the previous section, just obtaining the patches from this custom URL