GIT简易使用流程

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

 

posted @ 2015-07-01 20:33  Vito_L  阅读(180)  评论(0)    收藏  举报