如何使用cloud 9更改git存储库

如何使用cloud 9更改git存储库,git,github,cloud9-ide,cloud9,Git,Github,Cloud9 Ide,Cloud9,我使用以下命令克隆了一个github存储库 git config --global user.name "x" git config --global user.email x git init git add -A git commit -m "message" git remote add origin /link/ git push -u origin master 现在我在工作区中,希望将工作区连接到另一个GitHub存储库。怎么做 谢谢你的时间 如果您已经连接到github reop

我使用以下命令克隆了一个github存储库

git config --global user.name "x"
git config --global user.email x
git init
git add -A
git commit -m "message"
git remote add origin /link/
git push -u origin master
现在我在工作区中,希望将工作区连接到另一个GitHub存储库。怎么做

谢谢你的时间

如果您已经连接到github reop

,您需要先卸下遥控器

卸下遥控器 使用git remote
rm
命令从存储库中删除远程URL

git remote rm命令接受一个参数: 远程名称,例如,目标:

$git remote -v
# View current remotes
origin  https://github.com/OWNER/REPOSITORY.git (fetch)
origin  https://github.com/OWNER/REPOSITORY.git (push)
destination  https://github.com/FORKER/REPOSITORY.git (fetch)
destination  https://github.com/FORKER/REPOSITORY.git (push)
$git remote rm destination
# Remove remote
$git remote -v
# Verify it's gone
origin  https://github.com/OWNER/REPOSITORY.git (fetch)
origin  https://github.com/OWNER/REPOSITORY.git (push)
注意:git remote rm不会从服务器上删除远程存储库。它只是从本地存储库中删除远程存储库及其引用

第二,我使用git初始化新的存储库

希望能有帮助

如果您已经连接到github reop

,您需要先卸下遥控器

卸下遥控器 使用git remote
rm
命令从存储库中删除远程URL

git remote rm命令接受一个参数: 远程名称,例如,目标:

$git remote -v
# View current remotes
origin  https://github.com/OWNER/REPOSITORY.git (fetch)
origin  https://github.com/OWNER/REPOSITORY.git (push)
destination  https://github.com/FORKER/REPOSITORY.git (fetch)
destination  https://github.com/FORKER/REPOSITORY.git (push)
$git remote rm destination
# Remove remote
$git remote -v
# Verify it's gone
origin  https://github.com/OWNER/REPOSITORY.git (fetch)
origin  https://github.com/OWNER/REPOSITORY.git (push)
注意:git remote rm不会从服务器上删除远程存储库。它只是从本地存储库中删除远程存储库及其引用

第二,我使用git初始化新的存储库


希望它有帮助

您可以添加更多的遥控器,或者将默认的
遥控器更改为指向不同的遥控器,但是您通常不希望将存储库更改为转到不相关的远程存储库。如果您想处理完全不同的代码集,请创建一个新文件夹并
clone
init
(仅供参考,您所做的不是
clone
)。您可以添加更多遥控器或更改默认的
remote以指向不同的遥控器,但您通常不希望将存储库更改为不相关的远程存储库。如果您想处理完全不同的代码集,请创建一个新文件夹并
clone
init
(仅供参考,您所做的不是
clone
)。