• github新建本地仓库,再同步远程仓库基本用法


    github新建本地仓库,再同步远程仓库基本用法

    1 mkdir gitRepo
    2 cd gitRepo
    3 git init  #初始化本地仓库
    4 git add xxx  #添加要push到远程仓库的文件或文件夹
    5 git commit -m 'first commit'  #提交zhiqadd的文件
    6 git remote add origin https://github.com/yourgithubID/gitRepo.git  #建立远程仓库
    7 git push -u origin master #将本地仓库push到远程仓库

     先在github手动创建repo

    git init
    git add README.md
    git commit -m "first commit"
    git remote add origin https://github.com/yourId/repoName.git
    git push -u origin master
    

    同步更新到远程服务器

    git remote add origin https://github.com/yourID/repoName.git
    git push -u origin master
    

    这样就完成了。

  • 相关阅读:
    bzoj 5455
    hdu 6705
    hdu 6706
    斜率优化
    bzoj3672
    bzoj1367
    bzoj2118
    bzoj2337
    Codeforces 1077D Cutting Out(二分答案)
    Codeforces 1079C Playing Piano(记忆化搜索)
  • 原文地址:https://www.cnblogs.com/mxm2005/p/4916338.html
Copyright © 2020-2023  润新知