Translation(s): none


A lot of git and git-buildpackage commands needed got more than one option, are needed seldom and are hard to remember. This page is supposed to be a reminder, not a detailed explanation. Like: You remember you had to use a git-buildpackage command, but can't find it in your notes any more (and neither online).


clone from gitorious for rebuilding

gbp-clone --pristine-tar

By cloning like this you will be able to build the package with


for example if you want to have a look at the package of someone else.

import new upstream version

If there is a working debian/watch file:

git-import-orig --pristine-tar --uscan

If you need to download a new upstream tarball manually:

git-import-orig --pristine-tar path/to/<new-upstream-version>.tar.gz


simple push

To push to gitorious run

git push --all
git push --tags

A typical gotcha is to "git push origin master" instead (and or to forget the --tags push).

git commit --amend

To make it short: it can help you if you edit the same file a few times to figure out what to do, but will keep your commit log clean. The manpage

man git-commit

is elaborate.

add further remotes

Example: You got your package at alioth, now upgrade it to a new upstream and want to push your changes to the gitorious/debian-diaspora team repo to show it to others. Try the following (but don't expect it to work perfectly, don't to this the other way around, to alioth, until you are sure how it works).Another example is that you want to have a backup of your repo at another git-server, for example a local version of gitolite.

gbp-clone --pristine-tar

and your remote will be:

git remote -v
origin (fetch)
origin (push)

Now add another remote at the gitorious/debian-diaspora repo

git remote add gitorious

git remote -v will confirm that it was created, now push to gitorious. gitorious is just the handle you give it. You can choose what makes most sense to you.

git push --all gitorious
git push --tags gitorious