Git使用方法:
1. $ git init 创建仓库
2. 设置签名 签名相当于用户名 签名使用就近原则 分为项目和仓库级别
$ git config user.name tom / $ git config user.email
[email protected]3.$ git status 查看仓库状态
4. $ vim 文件名 创建/修改文
5. $ git -add 文件名 添加文件进暂存区
6. $ git rm -cached 文件名 从暂存区移除文
7. $ git commit 文件名 提交文件到本地
8. $ cat 文件名 查看文件内
9. $ git commit -m "仓库名" 文件名 提交到本地
10. $ git remote -v / fetch表示取回 / push表示推送 查看仓库保存路径
11. $ git remote add origin 路径名 添加仓库保存路径,origin 表示路径的别名,相当于java中变量存放了这个路
12. $ git remote remove origin 删除仓库保存路
13. $ git push origin master 上传仓
14. $ git reflog 显示带HEAD{指针}的 查看历史版