1.在本地目录下关联远程repository :

1
git remote add origin git@github.com:git_username/repository_name.git

2.取消本地目录下关联的远程库:

1
git remote remove origin

参考:https://blog.csdn.net/wsycsdn19930512/article/details/50574217