码迷,mamicode.com
首页 > 其他好文 > 详细

Git 常用命令

时间:2014-08-10 12:57:20      阅读:302      评论:0      收藏:0      [点我收藏+]

标签:os   文件   ar   line   log   res   ad   ef   

git init           创建repository

git add readme.txt    添加文件

git commit -m "log"   提交到master,添加log内容

git status 查看repository 状态

git diff readme.txt    查看修改内容

git log (--prety=oneline) 查看log,后面参数可选

git reset --hard HEAD^  回退上个版本(HEAD指当前版本,^个数表示上几个版本)

git reset --hard HEAD~100 回退n个版本

git reset --hard 3628164  回退到commit为3628164版本

git reflog         查看每一次命令

 

Git 常用命令,布布扣,bubuko.com

Git 常用命令

标签:os   文件   ar   line   log   res   ad   ef   

原文地址:http://www.cnblogs.com/gabo/p/3902644.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!