Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Git是一款免费、开源的分布式版本控制系统。用于敏捷高效地处理任何或小或大的项目。
1、安装
Archlinux
sudo pacman -S git
初次运行Git前的配置
git config
/etc/gitconfig
文件:适用系统中所有用户。使用git config
时用--system
选项。~/.gitconfig
文件:适用于当前用户。使用git config
时用--global
选项。
查看配置信息
要检查已有的配置信息,可以使用git config --list
命令。
2、创建版本库
创建版本库有两种方法:
- 创建一个空目录,通过
git init
命令把这个目录变成Git可以管理的仓库。 - 从远程库克隆,
git clone git@github.com:yourname/project.git
git remote add origin git@github.com:yoursaf/profiles.git
git remote add origin git@gitee.com:yoursaf/profiles.git
git push –force origin master