zoukankan      html  css  js  c++  java
  • github导入文件操作

    建立本地仓库:

    创建新仓库的指令:

      git init //把这个目录变成Git可以管理的仓库
      git add README.md //文件添加到仓库
      git add . //不但可以跟单一文件,还可以跟通配符,更可以跟目录。一个点就把当前目录下所有未追踪的文件全部add了 
      git commit  "first commit" //把文件提交到仓库
      git remote add origin https://github.com/connordb/douban_img.git //关联远程仓库
      git push  origin master //把本地库的所有内容推送到远程库

    首先在github创建一个仓库

    Your repositories--new--douban_img(仓库名)

    接下对库进行clone,如下:

    输入:git clone https://github.com/connordb/douban_img.git

    显示:

    Cloning into 'douban_img'...
    warning: You appear to have cloned an empty repository.

    输入:git init

    显示:

    Initialized empty Git repository in E:/Python/爬虫/douban_imgs/.git/

    本地创建一个README.md文件

      touch README.md
      git add README.md
      git commit -m 'first_commit'
      git remote add origin https://github.com/connordb/douban_img.git
      git push origin master

    创建完README.md后,就可以push了

       git add .
      git commit -m 'first_commit'
      git remote add origin https://github.com/findingsea/myRepoForBlog.git
      git push origin master

    这时候,我们就已经上传成功了!

     
  • 相关阅读:
    Java创建和解析Json对象
    Tyche 2191 WYF的递推式
    Tyche 2147 旅行
    Tyche 2317 Color
    洛谷 P1092 虫食算
    洛谷 P3951 小凯的疑惑
    BZOJ 1800 [Ahoi2009]fly 飞行棋
    BZOJ 1034 [ZJOI2008]泡泡堂BNB
    洛谷 P2151 [SDOI2009]HH去散步
    Android开发环境配置
  • 原文地址:https://www.cnblogs.com/ConnorShip/p/9995401.html
Copyright © 2011-2022 走看看