Git 简单6步清空所有commit记录的方法

    选择打赏方式

  1. Checkout
    git checkout --orphan latest_branch
  2. Add all the files
    git add -A
  3. Commit the changes
    git commit -am "commit message"
  4. Delete the branch
    git branch -D master
  5. Rename the current branch to master
    git branch -m master
  6. Finally, force update your repository
    git push -f origin master
版权声明:若无特殊注明,本文为《傲世》原创,转载请保留文章出处。
本文链接:https://www.recho.cn/257.html
正文到此结束

热门推荐

发表吐槽

你肿么看?

你还可以输入 250 / 250 个字

呵呵 哈哈 吐舌 开心 笑眼 可怜 乖 啊 你懂得 不高兴 生气 汗 黑线 哭 真棒 阴险 鄙视 酷 滑稽 纳尼 疑问 委屈 惊讶 勉强

评论信息框
可使用QQ号实时获取头像自动填写

私密评论

吃奶的力气提交吐槽中...


竟然没有人吐槽,快赶紧抢沙发吧!