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
作者:Vito_L
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
浙公网安备 33010602011771号