[Git]checkout 指定版本
Task:知道commit号,如何checkout 指定版本
1. 切换到master: git checkout master
2. 下载最新代码: git pull
3. 下载head: git checkout HEAD
4. 查看log找到需要的版本: git log
5. 根据header checkout : git checkout XXXXXX
[root@hpc66- ebs]$ git branch
* consistencyCheck
master
[root@hpc66- ebs]# git checkout master
Switched to branch 'master'
[root@hpc66- ebs]# git branch
consistencyCheck
* master
[root@hpc66- ebs]# git checkout HEAD
[root@hpc66- ebs]# git log |more
commit e24385f84866f0010d3317164b23be9e6054f283
Merge: 31d7dc5 41ac93d
Author: wa357 <wa6@dd.com>
Date: Wed Apr :: + merge modify_election commit 41ac93d383abf2e3b83a2df1cd3c201877867d2d
Author: lij <lij@dd.com>
Date: Mon Apr :: + modify the position of calling commit 40b81hpc6685c7340106206fa171d0611767d40f93b
[root@hpc66- ebs]# git checkout e24385f84866f0010d3317164b23be9e6054f283
Note: checking out 'e24385f84866f0010d3317164b23be9e6054f283'. You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at e24385f... merge modify_election_datanode_algorithm
[root@hpc66- ebs]#
[root@hpc66- ebs]# git branch
* (detached from e24385f)
consistencyCheck
master
check out 指定的branch
git clone git@git.com:XXXX.git
git branch
git branch -a //查看历史
git branch -d dev //删除本地分支
git checkout -b dev origin/dev //checkout 远程
git log //查看日志
[Git]checkout 指定版本的更多相关文章
- 使用git checkout 指定git代码库上的指定分支
因为曾经一直是在用svn,到狼厂,大家都用Git. 哥的开发环境:IntelliJ 说说简单的操作过程吧. 1.检出Git代码库 cd到指定文件夹 git clone http://..../andr ...
- git下载指定版本的代码
1. git fetch https://github.com/angular/angular.js.git v1.5.8 或 2. git pull https://github.com/angul ...
- (AOSP)repo checkout指定版本
aosp 怎么切换分支? To properly switch Android version, all you need to change is branch for your manifest ...
- git pull 指定版本
git init git remote add origin git@bitbucket.org:huashiyiqike/lstm-hf.git git pull origin master
- 在 Git 中 Checkout 历史版本
昨天写代码的时候,误删了一个文件.今天发现的时候,commit 已经 push 到版本库了.本想用 git reset 回退版本,找回文件后重新提交.但是想起 Git 是一个版本控制系统哎,直接从版本 ...
- [git] 更新到某个指定版本
[git] 更新到某个指定版本 - Vanquisher - 博客频道 - CSDN.NET [git] 更新到某个指定版本 2015-09-06 09:30 527人阅读 评论(0) ...
- git更新Activemq在远程github上指定版本的源码步骤
第一步:根据地址克隆源码 (activemq-5.9) $ git clone https://github.com/apache/activemq.git 第二步:查看远程源码的版本清单 ( ...
- Git 将代码回到指定版本
将代码回到hash为1fbcb7ea3b43df60c639875d2bb68e20b451059e的版本 git checkout 1fbcb7ea3b43df60c639875d2bb68e20b ...
- [Git] 获取指定的历史版本代码
首先 ,把项目 clone 到其他文件夹下 git clone git@github.com:skyming/BMAdScrollView.git 然后查看指定历史版本 tree 的 SHA chec ...
随机推荐
- git 打tag(版本)、推送代码
服务端:192.168.0.96 gitlab 客户端:192.168.0.97 git 服务端gitlab安装请参照: https://www.cnblogs.com/effortsing/p/10 ...
- Find minimum number of people to reach to spread a message across all people in twitter
Considering that I'ld would like to spread a promotion message across all people in twitter. Assumin ...
- web端自动化——Selenium3+python自动化(3.7版本)-火狐62版本环境搭建
前言 目前selenium版本已经升级到3.0了,网上的大部分教程是基于2.0写的,所以在学习前先要弄清楚版本号,这点非常重要.本系列依然以selenium3为基础. 一.selenium简介 Sel ...
- windows命令行 共享文件夹
net share dpantemp2 /DELETEnet share dpantemp2=d:\temp2 /GRANT:jk,FULL /REMARK:" web api 共享&quo ...
- Python离线环境
一.应用场景 比如:对于数据安全要求比较严格的机房,服务器是不允许上网的.那么我现在开发了一套python程序,需要一些模块,怎么运行? 二.离线包制作 有2个解决方案: 1. 使用requireme ...
- HTML:给body增加全屏的背景图
只需要在head中增加如下代码即可 <head> {#设置背景#} <style> body { height: 100%;width: 100%; background: u ...
- ECOC 2019展会:以太网联盟公开展示其下一代网络100/200/400G互通测试能力,网络自动化测试能力再次被提出
欧洲光纤通讯展ECOC 2019正在火热进行,以太网联盟组织Ethernet Alliance在其公开展台演示了其下一代高速网络100G/200G/400G相关能力,其成员单位Cisco,Arista ...
- 【计算机视觉】SeetaFace Engine开源C++人脸识别引擎
SeetaFace Engine是一个开源的C++人脸识别引擎,它可以在不依赖第三方的条件下载CPU上运行.他包含三个关键部分,即:SeetaFace Detection,SeetaFace Alig ...
- 你应该知道的4个DSP开发支持库
引言 在dsp开发中,为了节省开发时间和难度,TI将一些成熟的算法封装为模块,供开发者使用.如果能充分利用这些算法支持库,对于加快dsp开发进程与提高代码质量.稳定性有非常大的帮助. Digital ...
- AVIator -- Bypass AV tool
前提概要 项目地址:https://github.com/Ch0pin/AVIator AV:全名为AntiVirus,意指为防病毒软件 AVIator是一个后门生成器实用程序,它使用加密和注入技术来 ...