Git命令整理
来源:互联网 发布:网络犯罪罪名 编辑:程序博客网 时间:2024/05/01 19:07
回退上一版本 $ git reset --hard HEAD^HEAD is now at ea34578 add distributed
HEAD
指向的版本就是当前版本,因此,Git允许我们在版本的历史之间穿梭,使用命令git reset --hard commit_id
。穿梭前,用
git log
可以查看提交历史,以便确定要回退到哪个版本。要重返未来,用
git reflog
查看命令历史,以便确定要回到未来的哪个版本
查看分支:git branch
创建分支:git branch <name>
切换分支:git checkout <name>
创建+切换分支:git checkout -b <name>
合并某分支到当前分支:git merge <name>
删除分支:git branch -d <name>
git rebase -i devbranch~3 表示要修改最近提交的3个版本
然后 git commit --amend
git rebase --continue
0 0
- GIT命令整理
- 常用git命令整理
- Git基本命令整理
- 常用git命令整理
- Git命令整理
- Git基本命令整理
- git命令整理
- Git使用命令整理
- Git命令整理
- git使用命令整理
- git 基本命令整理
- git命令整理
- git命令整理
- git基础命令整理
- GIT命令整理
- git操作命令整理
- Git命令整理
- Git 简单命令整理
- "could not create the java virtual machine
- 新浪微博分享授权出错(error:redirect_uri_mismatch) 的解决办法
- struts2.3.16之环境搭建
- class类型重定义问题
- 在C++中一些小问题
- Git命令整理
- 字符串的基本用法
- Secure Delivery Center快速入门指南(五):本地更改
- Board level的启动流程分析
- GitHub 优秀的 Android 开源项目
- Facebook测试在品牌专页内开展电商销售
- POJ1338 & POJ2545 & POJ2591 & POJ2247 找给定规律的数
- codeforces #312C 558C C. Amr and Chemistry(位运算)
- 通过CookieManager给WebView设置Cookie