github入门教程

1.创建项目

  前提:注册github账号、登录

  点击start a project发起项目

  

  创建项目(仓库):

    Repository name:项目仓库名称

    点击Create repository创建创库

  

   创建成功:

   

2.创建本地git资源库

  前提:下载git客户端

  

   git安装(.ex安装,不上图了)

  本地创建项目文件夹,cmd进入当前文件夹(例:F:gitRepostory20200518)

  配置git客户端用户名和email

  配置用户名命令: git config --global user.name 'zwl'

  配置email命令: git config --global user.email '1099275839@qq.com'

  检查配置命名:git config -l

   

   配置git完成

3.上传文件

  首先执行git init初始化

  配置本地和远端关联使用git remote add origin https://github.com/zhaowenlong2018/MyProject200518.git

    本地创建文件、文件夹

  使用git status查看文件状态

  

   配置本地生效

  首选执行git add * 后;再使用git commit命令提交

  

   

   推送远端

   使用git push -u master;输入用户名密码推送远端

   

  推送远端成功

   

 4.分支提交

  找到仓库,使用fork下载到自己的github中

  修改文件,使用pull requests对比内容后,使用create pull requst提交主干

5.合并主干

  点击merge pull request 添加注释,使用confirm merge提交合并

  

原文地址:https://www.cnblogs.com/ywzq/p/12909697.html