轉移已存在的git remote
1.如果你原本的remote 是 origin...則先改名
vi .git/config
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/github`/*
url = git@github.com:kk/test.git
==>
[remote "github"]
fetch = +refs/heads/*:refs/remotes/github`/*
url = git@github.com:kk/test.git
2.增加一各 remote
git remote add origin git@gitweb.sw1.net:kernel8006.git
3.查看config
vi .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "github"]
fetch = +refs/heads/*:refs/remotes/github`/*
url = git@github.com:kk/test.git
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = git@gitweb.kk.net:test2.git
fetch = +refs/heads/*:refs/remotes/origin/*
4.上傳到新的remote
git push --all
留言列表