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 email@example.com:debian-diaspora/ruby-columnize.git
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
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
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 firstname.lastname@example.org:/git/pkg-ruby-extras/ruby-xpath.git
and your remote will be:
git remote -v origin email@example.com:/git/pkg-ruby-extras/ruby-xpath.git (fetch) origin firstname.lastname@example.org:/git/pkg-ruby-extras/ruby-xpath.git (push)
Now add another remote at the gitorious/debian-diaspora repo
git remote add gitorious email@example.com:debian-diaspora-repos/ruby-xpath.git
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