1.建立仓库
新建文件夹
命令窗口在该文件夹下执行
git init
2.拷贝代码
命令窗口在该文件夹下执行
git clone 远程服务器地址(如:https://git.oschina.net/zwxiaole/codeTemplate.git)
3.增加文件
增加所有文件
git add *
增加某个文件
git add 文件名
4.删除文件
git rm 文件名
5.修改文件
修改完也是执行 git add 文件名
6.提交操作
git commit -m "这里写注释"
7.提交到服务器
git push origin master
8.获取最新的代码
git pull
9.设置用户名邮箱 本用户全局
git config --global user.name "xxxx"
git config --global user.email "xxxx"
10.设置用户名邮箱 所有用户全局
git config --system user.name "xxxx"
git config --system user.email "xxxx"
11.当前目录
git config --user.name "xxxx"
git config --user.email "xxxx"