zoukankan      html  css  js  c++  java
  • git 与github

    https://www.cnblogs.com/cxk1995/p/5800196.html

    预置条件:注册了一个github账号,且还在上面创建了一个仓库。

         git 正确安装

    步骤:从github上将远程仓库拷贝下来

    zhufei@SilverRiver:~/zftest$ git clone https://github.com/zhufei2007fang/hello-world.git
    正克隆到 'hello-world'...
    remote: Counting objects: 7, done.
    remote: Compressing objects: 100% (4/4), done.
    remote: Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
    展开对象中: 100% (7/7), 完成.

    在拷贝下来的hello-world目录中创建一个test.html

    zhufei@SilverRiver:~/zftest$ cd hello-world/
    zhufei@SilverRiver:~/zftest/hello-world$ ll
    总用量 16
    drwxr-xr-x 3 zhufei zhufei 4096 6月  25 23:16 ./
    drwxr-xr-x 3 zhufei zhufei 4096 6月  25 23:16 ../
    drwxr-xr-x 8 zhufei zhufei 4096 6月  25 23:16 .git/
    -rw-r--r-- 1 zhufei zhufei   57 6月  25 23:16 README.md
    zhufei@SilverRiver:~/zftest/hello-world$ touch test.html

    zhufei@SilverRiver:~/zftest/hello-world$ ll
    总用量 16
    drwxr-xr-x 3 zhufei zhufei 4096 6月  25 23:16 ./
    drwxr-xr-x 3 zhufei zhufei 4096 6月  25 23:16 ../
    drwxr-xr-x 8 zhufei zhufei 4096 6月  25 23:16 .git/
    -rw-r--r-- 1 zhufei zhufei   57 6月  25 23:16 README.md
    -rw-r--r-- 1 zhufei zhufei    0 6月  25 23:16 test.html
    zhufei@SilverRiver:~/zftest/hello-world$ git add test.html
    zhufei@SilverRiver:~/zftest/hello-world$ git commit -m "zf commit test.html"
    [master 37697c0] zf commit test.html
     1 file changed, 0 insertions(+), 0 deletions(-)
     create mode 100644 test.html
    zhufei@SilverRiver:~/zftest/hello-world$ git push -u origin master
    Username for 'https://github.com': zhufei2007fang
    Password for 'https://zhufei2007fang@github.com':
    对象计数中: 3, 完成.
    Delta compression using up to 4 threads.
    压缩对象中: 100% (2/2), 完成.
    写入对象中: 100% (3/3), 276 bytes | 276.00 KiB/s, 完成.
    Total 3 (delta 0), reused 0 (delta 0)
    To https://github.com/zhufei2007fang/hello-world.git
       a2e1fc3..37697c0  master -> master
    分支 'master' 设置为跟踪来自 'origin' 的远程分支 'master'。

    git add .        (注:别忘记后面的.,此操作是把hello-world文件夹下面的文件都添加进来)

    git commit  -m  "提交信息"  (注:“提交信息”里面换成你需要,如“first commit”)

    git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入github帐号和密码)

  • 相关阅读:
    显示所有用户,mysql的基本操作
    创建用户的方法 3种mysql创建方法
    mysql在win系统dos 安装版配置步骤详解
    Docker学习(二) 数据卷(Volume)的使用
    Docker学习-私有仓库docker-registry的使用
    php 调用curl_init失败
    ubuntu 远程 window
    ubuntu 16.04服务器安装apache2 + php + mysql
    Git 的简单使用及ssh配置问题-赖大大
    python scrapy 爬取西刺代理ip(一基础篇)(ubuntu环境下) -赖大大
  • 原文地址:https://www.cnblogs.com/zf201149/p/9226945.html
Copyright © 2011-2022 走看看