0

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?

Robert Munteanu
  • 65,183
  • 33
  • 198
  • 275

1 Answers1

2

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.

Cascabel
  • 451,903
  • 67
  • 363
  • 314