gerrit/Documentation/error-not-valid-ref.txt
Edwin Kempin b4830d201b Added explanation for "not valid ref" error
Added a documentation page that explains the "not
valid ref" error in details and what can be done
to solve the problem.

Signed-off-by: Edwin Kempin <edwin.kempin@gmail.com>
Change-Id: I6881c45cc3ef54ed7970bbb1fc63e2ec546e3d86
2011-01-12 07:12:36 -08:00

47 lines
1.6 KiB
Plaintext

not valid ref
=============
With this error message Gerrit rejects to push a commit if the target
ref in the push specification has an incorrect format (for example:
'/refs/for/master', 'refs/for//master').
To solve the problem you have to correct the target ref in the push
specification. Depending on whether you want to push your commit with
or without code review the ref format is different:
ref format for pushing a commit for code review:
------------------------------------------------
If it was the intention to push a commit for code review the target
ref in the push specification must be the project's magical ref
`refs/for/'branch'` (where 'branch' must be replaced with the name
of an existing branch to which you want to push your commit). Further
details about how to push a commit for code review are explained at
link:user-upload.html#push_create[Create Changes]).
Example for pushing a commit for code review to the 'master' branch:
----
$ git push ssh://JohnDoe@host:29418/myProject HEAD:refs/for/master
----
ref format for directly pushing a commit (without code review):
---------------------------------------------------------------
If it was the intention to bypass code review and to push directly to
a branch the target ref in the push specification must be the name of
the branch to which you want to push. Further details about how to
bypass code review are explained at link:user-upload.html#bypass_review[Bypass Review].
Example for pushing a commit directly to the 'master' branch (without
code review):
----
$ git push ssh://JohnDoe@host:29418/myProject HEAD:master
----
GERRIT
------
Part of link:error-messages.html[Gerrit Error Messages]