Re: how to create remote ref ref/meta/config ?

21 views
Skip to first unread message
Message has been deleted

Saša Živkov

unread,
Sep 26, 2016, 8:41:32 AM9/26/16
to Robert Bude, Repo and Gerrit Discussion


On Mon, Sep 26, 2016 at 1:52 PM, Robert Bude <r...@rupat.de> wrote:
hi Guys,

because of nescience, in former times i created a gerrit project the following way:

create project via gui
then delete from gerrit created git repo

this means you have direct access to bare repos hosted in Gerrit.. 
 
git clone --bare <existing repo> to the deleted gerrit repo

this results in not existing refs/meta/config ref.

so no my question is how to repair this ?
if i push a new commit via :
git push master:refs/meta/config ssh://gerritadmin/existing_project_with_many_commits_and_reviews  
(where master is a new git repo with one commit of the project.config file)
i get:
fatal: remote part of refspec is not a valid name in ssh://gerritadmin/assekuradeur_onestydirect

so how to create the remote ref ?

At the machine were Gerrit runs you can:
* clone that repository into new folder (outside of the Gerrit's "git" folder)
$ git clone /path/to/gerrit/git/your/repo

* create refs/meta/config branch and its content
* push back to the remote repo
$ git push origin refs/meta/config:refs/meta/config


On the other side it might be easier to create a new repository in Gerrit
and then push all refs/heads/* from the current one (one without refs/meat/config)
into the new one. 

--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages