码迷,mamicode.com
首页 > 其他好文 > 详细

git 版本控制

时间:2017-12-21 23:08:41      阅读:237      评论:0      收藏:0      [点我收藏+]

标签:别名   existing   nbsp   告诉   width   需要   git add   remote   comm   

参考博客:

http://www.cnblogs.com/ximiaomiao/p/7140456.html

http://www.cnblogs.com/smuxiaolei/p/7484678.html

 

1.注册GitHub账户

https://github.com/

技术分享图片

 

2.登录成功

技术分享图片

 

3.创建仓库

技术分享图片

技术分享图片

 

#…or create a new repository on the command line

echo "# 02" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/venicid/02.git
git push -u origin master


#…or push an existing repository from the command line

git remote add origin https://github.com/venicid/02.git
git push -u origin master

  

 

2.电脑安装git版本控制软件

  安装步骤:http://www.cnblogs.com/smuxiaolei/p/7484678.html

  技术分享图片

 

 技术分享图片

技术分享图片

 技术分享图片

 

 技术分享图片

 

3.上传文件到GitHub

 技术分享图片

 

技术分享图片

 

 

 

 

 5.进入项目目录

技术分享图片

 

1. 通过命令 git init 把这个目录变成git可以管理的仓库,如下:

技术分享图片

技术分享图片

2.创建文件

技术分享图片

 

3.暂存区:添加README.md到暂存区

技术分享图片

 

 5.过命令git status来查看是否还有文件未提交,

 技术分享图片

 

4.:本地仓库:用命令 git commit告诉Git,把文件提交到本地仓库。  提交注释

  本地仓库是.git

 技术分享图片

 

 5.过命令git status来查看是否还有文件未提交,

 技术分享图片

 

 

6.给远程仓库起个别名,此处需要登录

 技术分享图片

 

 7.push带远程仓库

技术分享图片

 

8.刷新远程库

 技术分享图片

 

4.下载GitHub远程仓库目录到本地文件

1.进入一个目录

技术分享图片

 

3.使用命令git clone克隆远程库下来

 技术分享图片

技术分享图片

 

2.创建本地库

 技术分享图片

技术分享图片

 

git 版本控制

标签:别名   existing   nbsp   告诉   width   需要   git add   remote   comm   

原文地址:http://www.cnblogs.com/venicid/p/8082606.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!