Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
contribute:dev:git:userrepos [2014/03/03 15:58] – created ochosi | contribute:dev:git:userrepos [2019/09/08 09:45] – [Repository maintenance] kevinbowen | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== User repositories ===== | ||
- | Contributors now have the possibility to create | + | ====== Xfce user repositories |
- | users/ | + | |
- | This is useful when you have no permission | + | Contributors now have the ability |
- | branch to build new features or fix bugs and have others test it out: | + | |
- | === 1. Clone the source repository === | + | users/$user/[a-z0-9-]+ |
- | git clone git://git.xfce.org/ | + | |
- | === 2. Add your user repository === | + | This is useful when you do not have permission to commit upstream directly or you want to work on some code privately without bothering other developers. Compared to upstream repositories, |
- | git remote add private ssh:// | + | |
- | === 3. Create a branch | + | * You can create any branch |
- | git checkout | + | |
+ | * You can decide which other users have write access to your repository as well, see below | ||
+ | * No notification emails are sent to the xfce4-commits mailing list | ||
- | === 4. Make changes === | + | As with developers with up-stream access rights, it is always advised to work on large patches in a user repository first. |
- | === 5. Push the branch to your own user repository === | + | < |
- | | + | |
- | Repos are [[http:// | + | ===== 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: | ||
+ | |||
+ | <file bash> | ||
+ | # clone the upstream repository | ||
+ | git clone git://git.xfce.org/ | ||
+ | |||
+ | # add a new remote repository with the name ' | ||
+ | git remote add private ssh://git@git.xfce.org/ | ||
+ | |||
+ | # 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 | ||
+ | |||
+ | # 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 | ||
+ | </ | ||
+ | |||
+ | Then, wait for a few minutes for the git repo to be available on https:// | ||
+ | |||
+ | ===== Repository maintenance ===== | ||
+ | |||
+ | There are a couple of commands for [[https:// | ||
+ | |||
+ | |||
+ | |||
+ | ==== Fast forward ==== | ||
+ | |||
+ | Note that you can't use non fast-forward pushes. However in user branches, you can remove, then repush your work. | ||
+ | |||
+ | <file bash> | ||
+ | git push user :branch ; git push user branch | ||
+ | </ | ||
+ | ==== 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, | ||
+ | |||
+ | <file bash>ssh git@git.xfce.org perms users/ | ||
+ | |||
+ | To revoke permissions, | ||
+ | <file bash>ssh git@git.xfce.org perms users/ | ||
+ | |||
+ | For more options, like listing permissions, | ||
+ | |||
+ | <file bash>ssh git@git.xfce.org | ||
+ | |||
+ | ==== Deleting your user repositories ==== | ||
+ | |||
+ | If you finished work in your user repository and it has been merged into the mainline, you can delete it from the server. Only the creator of the repo can delete it. Deleting is not done by removing all of the branches through | ||
+ | |||
+ | |||
+ | <file bash>ssh git@git.xfce.org D -h</ | ||
+ | |||
+ | For example, | ||
+ | |||
+ | <file bash># unlock the repository to allow deletion | ||
+ | ssh git@git.xfce.org D unlock users/ | ||
+ | |||
+ | # remove the repository from the server | ||
+ | ssh git@git.xfce.org D rm users/ | ||
+ | </ |