- git remote remove origin
- git remote add origin [YOUR NEW .GIT URL]
- edit your .git/config
[branch "master"]
remote = origin
merge = refs/heads/master
Now you can simply git push and git pull.
git branch -u origin/remote-branch-name local-branch-name
git pull
总结
git branch -u 关联本地分支和远程分支。其中origin/remote-branch-name 是远程分支, local-branch-name是本地分支