How can I make new branch in repository?

146 views
Skip to first unread message

Evans

unread,
Jan 11, 2010, 5:21:08 AM1/11/10
to Repo and Gerrit Discussion
I have made git server with gerrit2 and git. I used mirrored android
public repository.

I want to make new branch in every project. But I can't find any batch
processing method. I can find only the way Projects - Branches in
Gerrit web page. Follow is my steps to make branch.

$ repo init -u ssh://my_id@svr:29418/project.git -b eclair
$ repo sync
$ repo start eclair --all
$ repo forall -c git checkout -b eclair-typeB eclair
$ -----< I don't know anymore >-------

Please let me know the way how to add branch to remote server.

Shawn Pearce

unread,
Jan 11, 2010, 10:25:20 AM1/11/10
to repo-d...@googlegroups.com
Evans <shkim...@gmail.com> wrote:
> I have made git server with gerrit2 and git. I used mirrored android
> public repository.
>
> I want to make new branch in every project. But I can't find any batch
> processing method. I can find only the way Projects - Branches in
> Gerrit web page. Follow is my steps to make branch.
>
> $ repo init -u ssh://my_id@svr:29418/project.git -b eclair
> $ repo sync
> $ repo start eclair --all
> $ repo forall -c git checkout -b eclair-typeB eclair
> $ -----< I don't know anymore >-------

Go to Projects > -- All Projects -- and grant a group you are a
member of the Push Branch +2 permission.

Now in your repo client you can run a git push session to create
the branch in each project:

$ repo forall -c git push \$REPO_REMOTE eclair-typeB

This may take a few minutes. Unlike with sync, forall doesn't know
it should setup a master/slave connection for SSH, so it needs to
login and logout for each project. :-\

Evans

unread,
Jan 11, 2010, 8:33:33 PM1/11/10
to Repo and Gerrit Discussion
Thank Shawn.I did it and clear to me. :O

On Jan 12, 12:25 am, Shawn Pearce <s...@google.com> wrote:

Reply all
Reply to author
Forward
0 new messages