github克隆仓库与本地化

GitHub Import repository

在这里插入图片描述
在这里插入图片描述

  1. 需要克隆的仓库地址;
  2. 重命名仓库名称;
  3. 选择仓库属性;
  4. 开始导入,导入成功后会通过邮件通知。

本人Github 克隆到本地电脑

将上述克隆到自己github的仓库再克隆到本地电脑:

在这里插入图片描述

git clone https://github.com/**/**.git
cd **
# 查看仓库所属
git remote -v

本地仓库重定向到本人Github

如果本地电脑的仓库是从别人的Github仓库克隆的,需要重新指向自己的Github仓库。

git remote -v
# 输出
# origin  https://ghfast.top/https://github.com/JokerYan/NeRF-DS.git (fetch)
# origin  https://ghfast.top/https://github.com/JokerYan/NeRF-DS.git (push)

首先需要在字迹的Github上创建一个相关的仓库;

然后复制仓库地址;

执行命令替换远程源:

git remote set-url origin https://github.com/你的用户名/你的仓库名.git

示例:

git remote set-url origin https://github.com/usr/NeRF-DS.git
git remote -v
# origin  https://github.com/usr/NeRF-DS.git (fetch)
# origin  https://github.com/usr/NeRF-DS.git (push)

clone可以使用https://ghfast.top代理加速;
push则不适合使用代理,需要用原生地址

# fetch 用 shturl.cc/
git remote set-url origin https://shturl.cc//https://github.com/你的账号/你的仓库.git

# push 切回 github.com
git remote set-url --push origin https://github.com/你的账号/你的仓库.git
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

余加木

想喝蜜雪冰城柠檬水(≧≦)/

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值