CDN Space
Learn Skills ,Record Life
CDN Space

Git 如何重置commit记录

#Clone your git repo
git clone https://github.com/lestatzhang/lestatzhang.github.io.git;
#Entre your local repo
cd lestatzhang.github.io;
#Checkout
git checkout --orphan latest_branch;
#Add all the files
git add -A;
#Commit the changes
git commit -am "Reinitialize";
#Delete the branch
git branch -D master;
#Rename the current branch to master
git branch -m master;
#Finally, force update your repository
git push -f origin master;
————————————————
版权声明:本文为CSDN博主「Lestat.Z.」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yolohohohoho/article/details/90607229

赞赏

CDN

文章作者

发表评论

textsms
account_circle
email

CDN Space

Git 如何重置commit记录
#Clone your git repo git clone https://github.com/lestatzhang/lestatzhang.github.io.git; #Entre your local repo cd lestatzhang.github.io; #Checkout git checkout --orphan late…
扫描二维码继续阅读
2020-03-22