Robert Munteanu
Robert Munteanu

Reputation: 68268

Rebase-push cycles for git branches

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?

Upvotes: 0

Views: 392

Answers (1)

Cascabel
Cascabel

Reputation: 496782

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.

Upvotes: 2

Related Questions