costume GIT usage for me

2017-08-06  本文已影响0人  沧浪之水v

说明:仅需要了解基本操作,之后这些操作的基础上逐个添加复杂操作。

1. 配置git

直接编辑 ~/.gitcofig 文件即可!

2. 查看git状态

git status

3. 创建git

git init

3.2 git clone 通过克隆来创建

git clone git@github.com:username/myNCCL.git

注意:有些protocal是不能来push的
比如 https

4. 添加文件到缓存区

git add

5. 提交

git commit

6. 发布

git push

7. 删除

git rm : 此时源文件与缓存区的数据都删除
git rm --eached 只删除暂存区的

8. 恢复数据

git reset --head HEAD/码

9.版本变换

git checkout NAME

还有待完善!

10.查看commit的历史记录

git log --oneline
或者
glol oh my zsh 的快捷键

上一篇 下一篇

猜你喜欢

热点阅读