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

git常用命令

时间:2017-06-02 11:34:07      阅读:198      评论:0      收藏:0      [点我收藏+]

标签:git   版本   git reset   命令   push   ranch   out   eve   远程仓库   

1.新分支

  创建新分支:git branch <branch_name>

  创建分支并切换到新的分支上:git checkout -b <branch_name> 

2.切换到新分支:git checkout <branch_name> 

3.回滚版本:git reset –hard commit-id 

4.删除本地分支:git branch -D <branch_name> 

5.删除远程分支:git push origin --delete <branch_name>

6.将新分支上传到远程仓库:git push -u origin develop 

7.查看提交的记录:git log

git常用命令

标签:git   版本   git reset   命令   push   ranch   out   eve   远程仓库   

原文地址:http://www.cnblogs.com/cv-pr/p/6932049.html

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