zoukankan      html  css  js  c++  java
  • Github首次使用,上传代码

    参考博客:https://blog.csdn.net/zhangsiyao11/article/details/77007684

    1.首先下载客户端github下载地址为 https://github-windows.s3.amazonaws.com/GitHubSetup.exe 然后点击安装

    2.创建自己的代码库,在name处输入自己的代码库名称

    3.打开git shell

    输入ssh-keygen -t rsa -C "用户名/邮箱"

    然后会出现选择路径,可以填或者按回车选择默认

    密码处直接回车即为空,然后会生成密钥。

    ☆按照默认路径找到id_rsa.pub,复制内容

    4.github右上角点击

    点击

    添加成功之后进行验证   执行命令 ssh -T git@github.com

    出现问题,填写yes

    Are you sure you want to continue connecting (yes/no)? yes

    之后会出现Hi+你的用户名,即为成功

    5.克隆仓库到本地

    git clone https://github.com/----  ---为代码仓库地址

    可以在初始的默认路径下找到

    6.准备上传代码进入到本地文件名和代码仓库相同的路径,路径下包含README.md

     git init

     git add " "   双引号中为文件名

    git commit -m " "  引号为名称,可以随意写但不能为空

      过程中可能出现 *** Please tell me who you are.

      此时按照他的命令提示 git config --global user.email "you@example.com" 输入邮箱

      在此执行commit命令即可成功

    7.执行

    git remote rm origin

     git remote add origin https://github.com/你的仓库地址

    git pull origin master

    git push origin master   可能需要输入你的用户名密码,输入之后等待即可上传

    8.上传结束之后可查看

  • 相关阅读:
    Single Round Match 811 1~4 题解
    AtCoder Beginner Contest 215 A~F 题解
    Codeforces Round #739 (Div. 3) 题解
    Codeforces Round #737 (Div. 2) A~E 题解
    Codeforces Round #735 (Div. 2) A~D 题解
    CodeChef Starters 6 Division 3 题解
    AtCoder Beginner Contest 209 题解
    Codeforces Round #732 (Div. 2) A~D题解
    【YBTOJ】约数之和
    【Luogu P7794】[COCI2014-2015#7] JANJE
  • 原文地址:https://www.cnblogs.com/wys-373/p/10842969.html
Copyright © 2011-2022 走看看