Github(5)-开源开发-常见错误

廖雪峰老师博文学习笔记:https://www.liaoxuefeng.com/wiki/896043488029600/897884457270432


5. github开源开发

step1: Fork 开源项目至自己的github平台端
step2: 从自己的github 平台clone该仓库到本地
step3: 在本地进行开发,将文件push到自己的远端仓库
step4: 向开源项目发起pull reques,对方视情况答应你的合并代码要求

6. 报错log

6.1 fatal: remote origin already exists.

命令:

git remote add origin git@github.com:cyy-hub/Deecamp.git

报错:

fatal: remote origin already exists.

分析:已经关联了一个仓库
解决:删除原来的关联,在添加新的关联

git remote rm origin
git remote add origin git@github.com:cyy-hub/Deecamp.git

6.2 There is no tracking information for the current branch.

问题描述:

$ git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/ dev

原因:本地分支没有和远程分支建立联系
解决:建立联系

$ git branch --set-upstream-to=origin/dev dev
Branch ‘dev’ set up to track remote branch ‘dev’ from ‘origin’.

6.标签管理

暂时没get到有什么用,就不记了


廖雪峰老师博文学习笔记:https://www.liaoxuefeng.com/wiki/896043488029600/897884457270432

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值