Urgunt help - can't push = [remote rejected] HEAD -> refs/for/branch_name (change 191 closed)

4,036 views
Skip to first unread message

Demi Goldberg

unread,
May 13, 2015, 9:29:04 AM5/13/15
to repo-d...@googlegroups.com

Hi All,

Trying to push to gerrit but get the following error:

 ! [remote rejected] HEAD -> refs/for/branch_name (change 191 closed)
error: failed to push some refs to 'http://myname@gerrit01:8080/MyGit'

It looks one of my commits was already pushed but include a change - I currently have 4 commits ahead

What to do ? how to resolve ?



Edwin Kempin

unread,
May 13, 2015, 9:37:51 AM5/13/15
to Demi Goldberg, Repo and Gerrit Discussion
 



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Demi Goldberg

unread,
May 13, 2015, 9:48:47 AM5/13/15
to repo-d...@googlegroups.com
OK , got it but the problem is that my duplicate change-id is not in on latest commit ...
How can I change this change-id ?? not on the latest commit ?

Thx,

Edwin Kempin

unread,
May 13, 2015, 9:56:34 AM5/13/15
to Demi Goldberg, Repo and Gerrit Discussion
2015-05-13 15:48 GMT+02:00 Demi Goldberg <demi.g...@gmail.com>:
OK , got it but the problem is that my duplicate change-id is not in on latest commit ...
How can I change this change-id ?? not on the latest commit ?
You can fix it by doing an interactive rebase:
  https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase-i


 

Thx,


On Wednesday, May 13, 2015 at 4:29:04 PM UTC+3, Demi Goldberg wrote:

Hi All,

Trying to push to gerrit but get the following error:

 ! [remote rejected] HEAD -> refs/for/branch_name (change 191 closed)
error: failed to push some refs to 'http://myname@gerrit01:8080/MyGit'

It looks one of my commits was already pushed but include a change - I currently have 4 commits ahead

What to do ? how to resolve ?



Demi Goldberg

unread,
May 14, 2015, 6:47:31 AM5/14/15
to repo-d...@googlegroups.com
Thx for all,

I fixed the problem by using:

1. git rebase -i HEAD~5
2. change the pick command to edit on the problematic commit - save and exit
3. run the git commit --amend 
4. edit the comment , had to change the change-id to something else ... (replace some of the numbers manually)
5. git rebase --continue 
6. done - run the push command and it works !:)

Thx,
Demi Goldberg

 


On Wednesday, May 13, 2015 at 4:29:04 PM UTC+3, Demi Goldberg wrote:
Reply all
Reply to author
Forward
0 new messages