Topic on Talk:Gerrit/Advanced usage/Archive 2

[remote rejected] ("branch not found")

5
MWJames (talkcontribs)

Doing a "git push-for-review" (we are working on windows meaning that this phyton script thing is a no/go, so instead using we are using the manual setup setting the alias before push to "git config alias.push-for-review "push origin HEAD:refs/for/bug37446") results in nothing more than:

remote: Resolving deltas: 100% (4/4)
To ssh://mwjames@gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticResultF
ormats.git
 ! [remote rejected] HEAD -> refs/for/bug37446 (branch bug37446 not found)
error: failed to push some refs to 'ssh://mwjames@gerrit.wikimedia.org:29418/med
iawiki/extensions/SemanticResultFormats.git'

We create a branch bug37446, did the rebase, and checked that the SSH key is working (we are able to execute "ssh -p 29418 username@gerrit.wikimedia.org").

The questions that are left what does this error mean and how do we resolve this? (Personally I use github for quite a while and I hadn't had any issues with git but this gerrit setup is somehow confusing.)

😂 (talkcontribs)
MWJames (talkcontribs)

Yes, I know that but than since I want to commit certain changes only to a branch, how do I create a branch? You can't expect people to commit patches (because the rational behind git was that "branching gets much easier") when you don't explain how to do create a branch.

Saper (talkcontribs)

With Gerrit this is a bit different story. Gerrit acts as a gatekeeper and only accepts commits into pre-defined git branches because it needs to know where an approved commit should be merged after a successful review. So forget about "branching gets much easier" part as far as Gerrit is concerned.

Gerrit project administrator can create Gerrit branches in the repository.

Please see the mailing list for more details: "Gerrit question: pushing to another branch".

210.21.236.133 (talkcontribs)

I hava no idea about that

Reply to "[remote rejected] ("branch not found")"