github 如何清空某一branch的commits
高洛峰
高洛峰 2017-05-02 09:25:25
0
2
574

是这样的,我为某一个repo建了一个github page,也就是多出一个分支gh-pages。我是用的github网页版的automatic generator生成的gh-pages。

每次我更新gh-pages都会往gh-pages这个branch里commit东西。问题是这些历史记录对我没用,我担心commit太多了占地方而且看着不舒服。

有没有什么办法将这个分支的历史记录全部抹去?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(2)
仅有的幸福

Delete this branch and create a new branch with the same name

Ty80

Commit cannot be deleted. Even if you delete the branch, the commit record will not be deleted, so you cannot erase all branch history.
Of course, if you just want to make the branch look prettier, you can consider using git rebaseto compress the commit and then force push the branch

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!