清空 github 倉庫,而不是刪除重新創建.


-- Remove the history from

rm -rf .git

-- recreate the repos from the current content only

git init
git add .
git commit -m "Initial commit"

-- push to the github remote repos ensuring you overwrite history

git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
git push -u --force origin master

來源: https://gist.github.com/stephenhardy/5470814


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM