views:

58

answers:

1

I'm currently using a github repository with a single branch, based of a master branch of another repository. The github branch is a backup of my work, and definitely not meant for pulling, and as such I'm comfortable with rewriting its history when rebasing from the master repository.

My problem is that I want a clean history, and if histories diverge I can't do that. This happens if I do a push ( initial work ) + rebase - the second push is rejected.

I have tried to delete the branch and then push, but this has the nasty side effect of doing a drop-create of the repo, which is slow.

How should I approach this problem?

+2  A: 

git-push can accept option -f or --force to tell it to force the push to update the remote ref (branch) to the local value.

Jefromi