git检出特定日期的版本

参考来源:https://blog.csdn.net/lazycheerup/article/details/84951906

本地使用gitblit搭建的代码服务器,目前需要找到指定日期的版本,并且进行维护。

操作步骤

1、检出最新版

git clone https://xxx@1.1.1.1:8443/r/yyyy.git

 2、切换到某个Tag

找到特定日期的提交ID

 打开后获得

更新id为d4421380fedb0d57f324309ca53e5f548a6e972c

新建分支

git checkout -b KunPengCloud d4421380fedb0d57f324309ca53e5f548a6e972c

git checkout KunPengCloud

Already on 'KunPengCloud'

git push origin KunPengCloud

git branch -a

* KunPengCloud
master
remotes/origin/HEAD -> origin/master
remotes/origin/KunPengCloud
remotes/origin/master

返回gitbilit查看

原文地址:https://www.cnblogs.com/passedbylove/p/14102825.html