How to remove unnamed branch in git shown in Github network view

北城余情 提交于 2019-12-05 20:49:17

Assume the black branch starts at Commit A, and ends at Commit Z. Both A and Z are the blue dots. In the cmd, A and Z are the commit sha1.

git rebase --onto Z^2 A master

This makes a linear history. But if doing so, you must git push origin -f master:master to update the remote master by force and inform every member to fetch and track the new master and abandon the old one.

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