Gitcode实现从本地添加项目到远程仓库的问题总结

Q1:基本流程

 A:

  1. 进入目标目录(本地仓库地址)
    cd d:/目标目录地址

  2. 初始化
    git init hello.cpp
    
  3. 添加文件
    git add hello.cpp
  4. 提交版本
    git commit -m "test"
  • 上传远程代码并合并
    $ git push -u origin master -f

Q2:关联远程仓库的方式

A:

  1. #SSH#
    $ git remote add origin git@gitcode.net/qq_52281545/221900230.git
    创建ssh key:原文链接
    $ ssh-keygen -t rsa -C "youremail@example.com"

         登录:

$ ssh -T git@gitcode.net
  1. #Https#
    git remote add orgin https://gitcode.net/qq.52281545/221900230
    !!!:“上传远程代码并合并”的步骤中会出现一个弹窗。。。没找着怎么解决,就先pass了

Q3:fatal:‘origin‘ does not appear to be a git repository fatal:Could not read from remote repository

A: Q3解决方案链接

Q4:git push后报错:! [remote rejected] master -> master (pre-receive hook declined)

A:Q4解决方法原链接

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值