Xfce Wiki

Sub domains
 

This is an old revision of the document!


User repositories

Contributors now have the possibility to create user repositories. This allows all developers with git permissions to create their own repository with the following wildcard:

users/$user/[a-z0-9-]+

This is useful when you have no permission to commit upstream directly or you want to work on some code privately without bothering other. Compared to upstream repositories, user repositories have more permissions (for the creator):

  • You can create any branch name and delete them
  • Possible to rewind push / loose commits (see the git-push -f command)
  • You can decide which other users have write access to your repository as well, see below
  • No notification emails are send to the xfce4-commits mailing list

So also for developers with up-stream access rights, it is always advised to work on large patches in a user repository first.

It is also possible to use the GitHub mirror for user repositories. That said, the user repositories in Xfce look a bit more professional if you already have access to the git.xfce.org server.

Push to a private repository

Most often you will continue from the upstream repository and then push your changes on top of that to your user repo branch. If so follow the steps below:

# clone the upstream repository
git clone git://git.xfce.org/xfce/xfwm4
 
# add a new remote repository with the name 'private'
git remote add private ssh://git@git.xfce.org/users/$user/xfwm4
 
# create a new branch
# note we give the local branch name a different name so you can see to which remote it points
git checkout -b private-bug-1234 --track private/bug-1234
 
# improve the code and make commits
 
# push you changes
# the first time you do this, the server will create the repository if needed
git push -u private private-bug-1234

Repository maintenance

There are a couple of commands for gitolite to maintain your private repository.

Give other users write access

By default you are the only user with write access to the repository. To allow others to push changes as well (they can only push forward commits, and have no rights to create and delete), use this command:

ssh git@git.xfce.org perms users/$user/$repo + WRITERS $otheruser

The same command as above but with the minus-sign can be used to revoke the permission.

For more options, like listing permissions, see the usage help of the perms command:

ssh git@git.xfce.org perms -h

Delete your user repositories

If you finished work in your user repository and it's merged in mainline, you can delete it from the server. Only the creator of the repo can delete it. Deleting is not by removing all the branches though git push, but with ssh commands on the server. For help on this command run the following in a terminal.

ssh git@git.xfce.org D -h

As an example you can delete the xfwm4 repository we created earlier as follows:

# unlock the repository to allow deletion
ssh git@git.xfce.org D unlock users/$user/xfwm4
 
# remove the repository from the server
ssh git@git.xfce.org D rm users/$user/xfwm4