git 删除 commit 信息

Oct 28, 2019 20:38 · 60 words · 1 minute read· views git

#Clone your git repo
git clone <repo url>;
#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;
tweet Share