2907
Comment:
|
← Revision 17 as of 2013-10-18 23:38:29 ⇥
3009
Adding the link to http://www.eyrie.org/~eagle/notes/debian/git.html#debian
|
Deletions are marked like this. | Additions are marked like this. |
Line 13: | Line 13: |
* [[https://www.eyrie.org/~eagle/notes/debian/git.html#debian|elaborate tips at eyrie.org]] | |
Line 57: | Line 58: |
<<BR>> |
Translation(s): none
Introduction
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).
git-buildpackage
clone from gitorious for rebuilding
gbp-clone --pristine-tar git@gitorious.org:debian-diaspora/ruby-columnize.git
By cloning like this you will be able to build the package with
git-buildpackage
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
git
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 nadir-guest@git.debian.org:/git/pkg-ruby-extras/ruby-xpath.git
and your remote will be:
git remote -v origin myname-guest@git.debian.org:/git/pkg-ruby-extras/ruby-xpath.git (fetch) origin myname-guest@git.debian.org:/git/pkg-ruby-extras/ruby-xpath.git (push)
Now add another remote at the gitorious/debian-diaspora repo
git remote add gitorious git@gitorious.org: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