User Tools

Site Tools


Repo appearance on

You can change how your repository is shown on using a special refs/meta/cgit ref in each repository.

Creating the special ref

To create the special refs/meta/cgit ref, use the following commands:

git symbolic-ref HEAD refs/meta/cgit
git reset --hard
# add and commit any files you need, see below
git push origin HEAD:refs/meta/cgit
git checkout master

Editing files in the special ref

It is a bit trickier to edit files in the special ref as opposed to a normal branch.

git fetch origin refs/meta/cgit
git checkout FETCH_HEAD
# make any changes and commit them
git push origin HEAD:refs/meta/cgit
git checkout master

Cgit configuration options

You can add a cgitrc file to the refs/meta/cgit location, for example:

owner=Tux Penguino
desc=Frobble module development

Many repo.* configuration parameters are supported (see allowlist below). For in-depth description of each option, see man cgitrc.

Full list of allowed options (make sure there are no spaces around =):

# repository owner (e.g. your name)
owner=Tux Penguino
# repository description
desc=Frobble module development
# Link to the project home page
# Default branch to show, if it's not master
# turn off .tar.gz snapshots for this repository
# hide the repository from the listing, but leave it accessible via direct link
# don't make this repository accessible via cgit (but make it still clonable)

:!: Note, that ignore=1 still allows that repository to be cloned via git: or https: endpoints if someone knows the full path to it.

Repo-specific about tab

Your repository is probably going to be a clone of linux.git, so if you want to display different info in the "about" tab of the repo instead of the default linux README, you can add a separate README file in the refs/meta/cgit location.

We will look for README, and README.rst files, so if you want Markdown or ReST formatting in the about tab, you can use the appropriate file extension.

Note on caching

CGit heavily relies on caching, so it can take up to a few hours for the changes you made to the refs/meta/cgit ref to show up on

userdoc/cgit-meta-data.txt · Last modified: 2018-04-03 19:13 by mricon