shilipojianshen

情境1:

首先选择自己要下载版本的分支,通过 git clone 命令下载到本地

 

 

 

然后,在你的commits中找到你要下载的版本的commit号,如

 

 

切换到指定的版本号:

git checkout 17def2f

新建分支

git checkout -b branch

这时候,就下载到你想要的版本的代码了。

 

情境2:

如果是已经将代码下载到本地了,首先可以查看当前分支的commit记录

git log

 

 

这时候可以采用上一种方法,commit号取前7位即可。

当然还有新的方法

git branch newBranch 9a891305807db590af4c63e809b5fef600d922ce

然后切换到刚刚新建的branch

git checkout newBranch

git rev-parse HEAD

这时候你的当前分支就是你想要的版本了

原文链接:https://blog.csdn.net/M_Eve/article/details/84327219

分类:

技术点:

相关文章:

  • 2021-11-20
  • 2022-02-07
  • 2022-02-13
  • 2022-01-08
  • 2021-10-03
  • 2021-10-03
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2021-10-19
  • 2022-01-11
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
相关资源
相似解决方案