Rebase-push cycles for git branches

我与影子孤独终老i 提交于 2019-12-24 21:41:11

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/1627906/rebase-push-cycles-for-git-branches

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!