git 命令

来源:互联网 发布:一体化大数据宣传片 编辑:程序博客网 时间:2024/06/02 04:43

克隆git仓库中的一个分支

git clone -b <branch> <remote_repo>

git回滚到任意版本
1、先显示提交的log

git log -3commit 4dc08bb8996a6ee02fAuthor: Mark <xxx@xx.com>Date:   Wed Sep 7 08:08:53 2016 +0800    xxxxxcommit 9cac9ba76574da2167Author: xxx<xx@qq.com>Date:   Tue Sep 6 22:18:59 2016 +0800    improved the requstcommit e377f60e28c8b84158Author: xxx<xxx@qq.com>Date:   Tue Sep 6 14:42:44 2016 +0800    changed the password from empty to max123

2、回滚到指定的版本

git reset --hard e377f60e28c8b84158

切换分支
http://blog.csdn.net/u014540717/article/details/54314126

原创粉丝点击