CPython入门----Fork源码到自己github并下载配置本地git

网友投稿 259 2022-09-19

CPython入门----Fork源码到自己github并下载配置本地git

更多信息请关注 个人网站

一、基础准备工作

(1)首先在​​github​​​注册一个自己的账号 (2)在windows上安装git,可参考 ​​​Git安装----Windows10系统​​

二、Fork源码

(2)此时即将源码fork到自己的github代码仓下了

三、下载到本地及git配置

(1)首先确保已经在github配置公钥,如未配置,请参考 ​​github基础----配置公钥​​ (2)本地放代码的文件夹中右键-【git bash here】,打开git bash窗口

(3)在自己的代码仓中拷贝ssh类型的下载链接

(4)在(2)中打开的窗口中执行 git clone 操作,如:

Administrator@redrose2100-NJ MINGW64 /g/src$ git clone git@github.com:redrose2100/cpython.gitCloning into 'cpython'...remote: Enumerating objects: 866263, done.remote: Total 866263 (delta 0), reused 0 (delta 0), pack-reused 866263Receiving objects: 100% (866263/866263), 419.90 MiB | 2.78 MiB/s, done.Resolving deltas: 100% (687315/687315), done.Updating files: 100% (4556/4556), done.Administrator@redrose2100-NJ MINGW64 /g/src

(5)查看当前本地仓库与远端仓库的关联关系

Administrator@redrose2100-NJ MINGW64 /g/src$ cd cpython/Administrator@redrose2100-NJ MINGW64 /g/src/cpython (main)$ git remote -vorigin git@github.com:redrose2100/cpython.git (fetch)origin git@github.com:redrose2100/cpython.git (push)Administrator@redrose2100-NJ MINGW64 /g/src/cpython (main)

(6)设置upstream关联关系,如下:

Administrator@redrose2100-NJ MINGW64 /g/src/cpython (main)$ git remote add upstream git@github.com:python/cpython.gitAdministrator@redrose2100-NJ MINGW64 /g/src/cpython (main)$ git remote -vorigin git@github.com:redrose2100/cpython.git (fetch)origin git@github.com:redrose2100/cpython.git (push)upstream git@github.com:python/cpython.git (fetch)upstream git@github.com:python/cpython.git (push)Administrator@redrose2100-NJ MINGW64 /g/src/cpython (main)

​​CPython入门----Fork源码到自己github并下载配置本地git​​

​​CPython入门----下载安装Visual Studio 2017​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:计算机组成原理复习
下一篇:Hexo+GithubPage搭建Fan主题的博客(1)基础准备及Github仓库配置
相关文章

 发表评论

暂时没有评论,来抢沙发吧~