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

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

     
  • 相关阅读:
    python 学习笔记(四)(流程控制)
    python 写斐波那契数列
    python 部分术语对照表
    python 学习笔记(三)(对前两节的补充)
    python # -*- coding: utf-8 -*-
    写出更好的 JavaScript 条件语句
    PHP消息队列实现及应用
    VUE3.0 路由去掉#号
    php设计模式
    workerman 可能需要用到的函数
  • 原文地址:https://www.cnblogs.com/ConnorShip/p/9995401.html
Copyright © 2011-2022 走看看