blob: 1784fc877ff70d0f2a7e99737bee63b79b443f22 [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= not valid ref
Edwin Kempinb4830d22011-01-11 09:36:18 +01002
3With this error message Gerrit rejects to push a commit if the target
4ref in the push specification has an incorrect format (for example:
5'/refs/for/master', 'refs/for//master').
6
7To solve the problem you have to correct the target ref in the push
8specification. Depending on whether you want to push your commit with
9or without code review the ref format is different:
10
11
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080012== ref format for pushing a commit for code review:
Edwin Kempinb4830d22011-01-11 09:36:18 +010013
14If it was the intention to push a commit for code review the target
15ref in the push specification must be the project's magical ref
16`refs/for/'branch'` (where 'branch' must be replaced with the name
17of an existing branch to which you want to push your commit). Further
18details about how to push a commit for code review are explained at
19link:user-upload.html#push_create[Create Changes]).
20
21Example for pushing a commit for code review to the 'master' branch:
22----
23$ git push ssh://JohnDoe@host:29418/myProject HEAD:refs/for/master
24----
25
26
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080027== ref format for directly pushing a commit (without code review):
Edwin Kempinb4830d22011-01-11 09:36:18 +010028
29If it was the intention to bypass code review and to push directly to
30a branch the target ref in the push specification must be the name of
31the branch to which you want to push. Further details about how to
32bypass code review are explained at link:user-upload.html#bypass_review[Bypass Review].
33
34Example for pushing a commit directly to the 'master' branch (without
35code review):
36----
37$ git push ssh://JohnDoe@host:29418/myProject HEAD:master
38----
39
40
41GERRIT
42------
43Part of link:error-messages.html[Gerrit Error Messages]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070044
45SEARCHBOX
46---------