将已有Git库代码推送到新建库中

cd /path/to/your/git/repo/
git remote -v
git remote rm origin
git remote add origin ssh://[email protected]:8266/git/new/repo
scp -p -P 8266 [email protected]:hooks/commit-msg .git/hooks/
git push -u origin --all
git push -u origin --tags

 

转载于:https://www.cnblogs.com/drizzlewithwind/p/8953397.html

你可能感兴趣的:(将已有Git库代码推送到新建库中)