Kyl*_*lla 3 git terminal version-control github repository
我已经将一个 Git 仓库从原始源的upstream
master
仓库克隆到了我的本地机器上。
git remote -v
返回:
origin https://github.com/project.git (fetch)
origin https://github.com/project.git (push)
Run Code Online (Sandbox Code Playgroud)
但我现在知道我需要将这个upstream
master
分支分叉到我的个人 GitHub 帐户,克隆它,创建一个新分支,然后开始编码(这样我就不会直接对upstream
repo进行更改,而是对我自己的分叉origin
repo进行更改)。我已将 分叉upstream
master
到我的 GitHub 个人资料,但不知道如何继续。我需要git remote -v
看起来像这样:
origin https://github.com/myGitHubProfile/project.git (fetch)
origin https://github.com/myGitHubProfile/project.git (push)
upstream https://github.com/project.git (fetch)
upstream https://github.com/project.git (push)
Run Code Online (Sandbox Code Playgroud)
鉴于我已经upstream
master
从原始来源克隆了并且它已经设置为,我该如何实现origin
?
似乎您正在寻找:
git remote rename origin upstream
git remote add origin https://github.com/myGitHubProfile/project.git
Run Code Online (Sandbox Code Playgroud)
给“旧”origin
遥控器一个新upstream
名称并添加名为origin
.
归档时间: |
|
查看次数: |
475 次 |
最近记录: |