Replace master branch

24 views
Skip to first unread message

李大明

unread,
Jul 10, 2015, 5:49:14 AM7/10/15
to repo-d...@googlegroups.com
I create a new project on Gerrit, but push the wrong source code to its master.
Now I want to replace it with the correct code. How can I do this?

I download the new source code and try to push it to remote with -f

  git push origin master:master -f

It generate the following error:

   ! [remote rejected] master -> master (non-fast forward)

I though force push should work in this case. Anything I am missing?


Alex Blewitt

unread,
Jul 10, 2015, 5:58:11 AM7/10/15
to 李大明, repo-d...@googlegroups.com
You have to explicitly enable the force push permission for gerrit to permit that change. 

Sent from my iPhat 6
--
--
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.
Reply all
Reply to author
Forward
0 new messages