Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.