Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I tried executing the command git push gerrit HEAD: refs/for/BR_PS_1109

It gave the response: fatal: remote part of refspec is not a valid name in HEAD:

Git remote version is also fine, as evident below:-

vverma@l-vverma:~/git_repo/nextag$ git remote -v
gerrit  ssh://vverma@gerrit.corp.nextag.com:29418/apps/nextag (fetch)
gerrit  ssh://vverma@gerrit.corp.nextag.com:29418/apps/nextag (push)
origin  git@ind-git.corp.nextag.com:apps/nextag (fetch)
origin  git@ind-git.corp.nextag.com:apps/nextag (push)
share|improve this question

1 Answer 1

up vote 1 down vote accepted

You have a space between HEAD: and refs/for/BR_PS_1109 which souldn't be there. Remove the space and it should work:

git push gerrit HEAD:refs/for/BR_PS_1109

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.