On 01/25/2012 07:23 PM, Carlos Borroto wrote:
On Wed, Jan 25, 2012 at 1:12 PM, Alex Mestiashvili
<alex@biotec.tu-dresden.de> wrote:
On 01/25/2012 06:55 PM, Carlos Borroto wrote:
Hi,
I'm following our policy document to setup proper git repositories,
for new packages I intent to work on.
I got stuck using the recommended 'setup-repository' script. This is
what I'm doing:
$ ./setup-repository r-cran-rsqlite 'Packaging for R/CRAN/RSQLite'
Initialized empty shared Git repository in /home/cjavier/src/r-cran-rsqlite.git/
$ cd r-cran-rsqlite.git/
$ ls
branches config description HEAD hooks info objects refs
$ git import-orig --pristine-tar ../RSQLite_0.11.1.tar.gz
gbp:error: /home/cjavier/src/r-cran-rsqlite.git is not a git repository
Am I missing something here? The only thing I can see is the uses of
"--bare" in 'setup-repository', I tried to read about that option, but
couldn't quite understand what is for.
Thanks,
Carlos
Hi Carlos ,
its a bare repository and it contains only "metadata" but not working
files .
Usually you clone , pull and push to it and it's set as the remote
origin for your working repository .
Hi Alex,
If I understand correctly, you are saying this is not the way I should
create my local working git repository. This is the way I should
create the remote repository at alioth and then add it as a remote
repository to my local one, so I can push to it. Is this correct?
Yes , absolutely !
Pocking around in alioth, I see there is a '/git/debian-med/'
directory containing our package repositories. Is this where I should
create bare git repositories for my new packages?
Before pushing to git.debian.org for the first time, an empty
repository needs
to be created there. To do this, use the setup-repository
.
Run it similarly to:
$ ssh git.debian.org
$ cd /git/debian-med/
$ ./setup-repository libfoo-pkg 'Packaging of FOO in Debian'
This will create an empty, bare, shared Git repository and setup
some hooks.
Now, on your local machine add the alioth repository as a remote:
$ git remote add origin ssh://git.debian.org/git/debian-med/packages/libfoo-pkg.git
Then push to it:
$ git push --all --set-upstream
$ git push --tags
The --set-upstream option helps future use of git
pull.
taken from http://pkg-perl.alioth.debian.org/git.html
almost the same is written in the debian-med policy but I liked the way
it is written here :)
Thanks,
Carlos
Regards ,
Alex