git应用

1、注册github的账号,申请网站:https://github.com/

2、安装git(下载地址:https://git-scm.com/download/win)

安装、生成密钥、配置参考博客地址:http://www.cnblogs.com/joyho/articles/4062574.html

3、创建仓库

打开网站https://github.com/——登录账号——settings-点击repositories,点击“Create repositories”按钮,创建远程仓库

4、在本地创建仓库(git init)

1)在本地makdir 文件名或手动创建,选中文件夹,点击鼠标右键,点击Git bash here  

 2)打开指令框输入指令git init,变为Git可以管理的仓库。

5、建立本地仓库和远程仓库的连接

1)git remote add origin +远程仓库地址

2)提交时显示用户

  1. $ git config --global user.name "your_name"  
  2. $ git config --global user.email "your_email@youremail.com"

3)提交本次文件到github  A.git add 文件名或git add .   B.git commit -m "填写注释"      C.git push -u origin master

 

posted @ 2018-02-05 16:02  菜鸟--自动化  阅读(121)  评论(0编辑  收藏  举报