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

GIT简易使用流程

时间:2015-07-01 22:03:10      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

git是目前世界上最先进的分布式版本控制系统(摘自廖雪峰官网

首先需要在系统上安装git:

  • Windows系统在这下载
  • RHEL/Centos/Fedora用户可以用以下命令安装:yum -y install git
  • Debian/Ubuntu用户的安装命令:sudo apt-get install git
  • Arch用户的安装命令:sudo pacman -S git

配置用户名和邮箱:

1 git config --global user.name "yourname"
2 git config --global user.email "youremail"

还需要fork一个项目,这一步是在网页上操作

开始clone:

1 git clone https://github.com/yourname/项目名.git
2 比如:git clone https://github.com/robbyrussell/oh-my-zsh.git

为项目添加别名:

1 cd 项目名/
2 git remote add XM https://github.com/某某某/项目名.git
3 比如
4 cd oh-my-zsh/
5 git remote add myzsh https://github.com/robbyrussell/oh-my-zsh.git

获取更新与合并:

1 git pull myzsh master

 

GIT简易使用流程

标签:

原文地址:http://www.cnblogs.com/Vito-L/p/4614481.html

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