您的位置:首页 > 其它

git-everything-is-cool阅读笔记

2015-07-17 14:19 211 查看

git-everything-is-cool阅读笔记

git Documentation

知识点记录

git下文件的状态:untracked, unmodified, modified, staged

指令记录

初始化

git init

git add *.c

git commit -m ‘initial project version’

git clone https://github.com/libgit2/libgit2

git status

修改本地文件

git diff –staged

git diff –cached

git rm –cached README

git mv file_from file_to

记录

git log

git log -p -2

git log –stat

还原

git commit –amend (staged->modified/unmodified)

git checkout – CONTRIBUTING.md (modified->unmodified)

远程工作

git remote

git remote -v

git fetch pb

git pull

git push origin master

标签

git tag

git tag -a v1.4 -m ‘my version 1.4’ (增加tag)

git push origin v1.5

branch

git branch testing (创建新的branch)

git branch -d hotfix (删除branch)

git checkout testing (转换branch)

git checkout -b iss53

git log –oneline –decorate

git log –oneline –decorate –graph –all (查看branch开发进度)

git branch –merged (查看已经merge过的branch)

git branch -v (查看当前branch)

git branch –no-merged (查看未merged的branch)

remote branch

* git remote show (remote)

* git push origin serverfix

* git fetch origin
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: