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?
git-push
可以接受选项-f
或--force
来告诉它强制推送以将远程引用(分支)更新为本地值。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.