sh 重置Git回购

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 重置Git回购相关的知识,希望对你有一定的参考价值。

rm -rf .git --remove git history
git init -- recreate the repos from the current content only
git add .
git commit -m "Initial commit"

-- push to the github remote repos ensuring you overwrite history
git remote add origin git@<YOUR URL>:<YOUR ACCOUNT>/<YOUR REPO>.git
git push -u --force origin master

以上是关于sh 重置Git回购的主要内容,如果未能解决你的问题,请参考以下文章