首页 > 代码库 > Git手册 - 高级特性

Git手册 - 高级特性

一)更改origin仓库


git clone old-repo.git
cd old-repo
git remote rm origin
git remote add origin new-repo.git(url)
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git push origin master   //if should pull first and fail to merge, run > git pull origin master --allow-unrelated-histories

二)

Git手册 - 高级特性