zoukankan      html  css  js  c++  java
  • 使用git bash向github远程仓库提交代码

    1、登录github,创建仓库。

    2、切换到要提交的文件目录下。

    3、打开git bash 

      3.1、初始化仓库

    git init 

      3.2、将本地仓库与远程仓库关联

    git remote add origin https://github.com/lis-ylfy/config-test.git

      3.3、测试是否连接成功

    git remote

      输出origin表示成功

      3.4、将文件提交到暂存区

    git add .

     注意add 后面是空格,然后是 .

    git add . : 监控工作区的状态树,使用它会把工作时的所有变化提交到暂存区,包括文件内容修改(modified)以及新文件(new),但不包括被删除的文件。

      3.5、填写提交说明

     git commit -m "first commit, first version"

      -m 后面就是提交说明

      3.6、提交到远程仓库

    git push -u origin master 

      master是指主干分支

  • 相关阅读:
    lamp
    mysql多实例部署
    mysql进阶
    rsync
    mysql基础
    httpd
    ftp
    高级命令之awk
    NFS
    网络进阶管理
  • 原文地址:https://www.cnblogs.com/shun-gege/p/9497967.html
Copyright © 2011-2022 走看看