Thanks for the reply. However, this doesn't work. If I try to push
nothing, I get this error:
-----> Heroku receiving push
! Heroku push rejected due to an unrecognized error. Please try
error: hooks/pre-receive exited with error code 2
! [remote rejected] master (pre-receive hook declined)
error: failed to push some refs to 'g...@heroku.com:myapp.git'
When I push a branch with a different history (which is what I already
tried), it simply ADDS to the history. It doesn't replace what was
On Jun 9, 5:12 am, Konstantin Khomoutov <khomou...@gmail.com> wrote:
> On Jun 9, 12:34 am, Dan Z <danielza...@gmail.com> wrote:> I've got some apps
> on Heroku, and I need to re-init or clean out the
> > repositories they use, but Heroku doesn't support direct access to the
> > machine. Is there a git command I can use to re-init or completely
> > wipe out all history in the remote repository?
> You can delete any object (branches and tags) in the remote repo by
> pushing "nothing" to them.
> For example, to delete branches "master" and "slave" in the remote
> repo do
> $ git push origin :master :slave
> Alternatively, if the remote repo does not explicit hooks' setup
> preventing non-fast-forward updates, you can just forcibly push any
> new content of a branch. That is, if you have replaced the history of
> the branch "master", you can forcibly make remote's "master" have the
> same history by pushing it this way:
> $ git push -f origin master
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at