博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
git删除所有历史提交记录,只留下最新的干净代码
阅读量:6994 次
发布时间:2019-06-27

本文共 385 字,大约阅读时间需要 1 分钟。

git删除所有历史提交记录,只留下最新的干净代码

 

 

1.Checkout   git checkout --orphan latest_branch2. Add all the files   git add -A3. Commit the changes   git commit -am "commit message"4. Delete the branch   git branch -D master5.Rename the current branch to master   git branch -m master6.Finally, force update your repository   git push -f origin master

 

转载于:https://www.cnblogs.com/leoking01/p/10184514.html

你可能感兴趣的文章
Windows上搭建Flume运行环境
查看>>
Linux系统排查4——网络篇
查看>>
文件操作
查看>>
Python基本语法_异常处理详解
查看>>
3.6链表应用--基于链表实现栈
查看>>
1F - A+B for Input-Output Practice (III)
查看>>
常用IIS mime类型
查看>>
Debian系列网卡配置详解
查看>>
JS实现拖拽小案例
查看>>
myeclipse视图布局恢复
查看>>
2015 UESTC Training for Data Structures
查看>>
喜大普奔!开启我的博客之旅!
查看>>
Ubuntu相关的笔记
查看>>
session技术进行登录验证问题解析
查看>>
Linux 求某一列平均值
查看>>
安卓虚拟机配置问题
查看>>
【动态规划】Gym - 101102A - Coins
查看>>
【kd-tree】hdu5992 Finding Hotels
查看>>
【函数式权值分块】【分块】bzoj1901 Zju2112 Dynamic Rankings
查看>>
流程控制
查看>>