zoukankan      html  css  js  c++  java
  • Git上传本地的项目到远程仓库(第一次上传)

    1.ssh-keygen -t rsa -C 843409677@qq.com

    2.会在本地C:Users你的用户名.ssh生成文件夹,里面有id_rsa和id_rsa.pub两个文件
    然后复制id_rsa.pub文件里面的内容,到https://github.com/settings/keys新建一个,

    3.在项目文件夹中 用git bash here 输入 git init命令,使项目文件夹加入git管理;
    还需要新建一个文件 README.md github官方要求提交项目得有这个文件。
    4.输入  git add .(不要漏了“.”),将Test文件夹全部内容添加到git。
    如果报了文件格式的错误,输入 git config --global core.autocrlf false

    5.输入  git commit -m "first commit"
    6.输入  git remote add origin https://github.com/shench5612390/Test.git(git remote add origin 你自己的https地址),连接你的guthub仓库。
    7.输入  git push -u origin master,上传项目到Github。这里会要求输入Github的账号密码,按要求输入就可以。

    8.需要输入用户名和邮箱,配置一下再次提交就可以了。
    git config user.name “用户名”
    git config user.email 邮箱地址

    9.删除远程的文件
    git rm 文件名
    git commit -m "for test"
    git push

  • 相关阅读:
    ZOJ 3954 Seven-Segment Display
    ZOJ 3955 Saddle Point
    ZOJ 3950 How Many Nines
    ZOJ 3957 Knuth-Morris-Pratt Algorithm
    PAT L2-018. 多项式A除以B
    hihocoder 1500 EL SUENO
    hihocoder 1498 Diligent Robots
    hihocoder 1497 Queen Attack
    hihocoder 1490 Tree Restoration
    SCU 4443 Range Query
  • 原文地址:https://www.cnblogs.com/Kali-BT/p/12161585.html
Copyright © 2011-2022 走看看