您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
本篇内容主要讲解“Git怎么实现克隆历史的某个版本”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Git怎么实现克隆历史的某个版本”吧!
# 查看历史记录git log -3
实例
Simba@SIMBA MINGW64 /t/IDE/IDEA/Workspace-Learn/config-center ((af05c43...)) $ git log -3 commit af05c43b5c6b14abbe9c6267811e4fb0a2d2b372 (HEAD, origin/master, origin/HEAD, master) Author: Simba1949 <simba1949@outlook.com> Date: Sun Jul 28 17:27:54 2019 +0800 springcloud多环境配置文件 commit d124e2b35da7a9b51368e5f2d156b1128781c517 Author: Simba1949 <simba1949@outlook.com> Date: Sun Jul 28 16:39:14 2019 +0800 SpringCloudConfig 多环境配置文件 commit acb80687cd82151f1beba3518c6a5327fad91c9a Author: Simba1949 <simba1949@outlook.com> Date: Sun Jul 28 11:40:10 2019 +0800 SpringCloud 学习笔记之分布式配置中心Config的学习,上传配置文件
# 选择需要克隆的历史版本 git checkout acb80687cd82151f1beba3518c6a5327fad91c9a
实例
Simba@SIMBA MINGW64 /t/IDE/IDEA/Workspace-Learn/config-center ((af05c43...)) $ git checkout acb80687cd82151f1beba3518c6a5327fad91c9a Previous HEAD position was af05c43 springcloud多环境配置文件 HEAD is now at acb8068 SpringCloud 学习笔记之分布式配置中心Config的学习,上传配置文件
# 恢复最新数据 git pull origin master
实例
Simba@SIMBA MINGW64 /t/IDE/IDEA/Workspace-Learn/config-center ((acb8068...)) $ git pull origin master From https://github.com/simba1949/config-center * branch master -> FETCH_HEAD Updating acb8068..af05c43 Fast-forward .../default/spring-cloud-config-multi-client.properties | 1 + .../dev/spring-cloud-config-multi-client-dev.properties | 1 + .../prod/spring-cloud-config-multi-client-prod.properties | 1 + .../spring-cloud-config-multi-client-dev.properties | 1 + .../spring-cloud-config-multi-client-prod.properties | 1 + .../spring-cloud-config-multi-client-test.properties | 1 + .../test/spring-cloud-config-multi-client-test.properties | 1 + 7 files changed, 7 insertions(+) create mode 100644 spring-cloud-config-multi-client/default/spring-cloud-config-multi-client.properties create mode 100644 spring-cloud-config-multi-client/dev/spring-cloud-config-multi-client-dev.properties create mode 100644 spring-cloud-config-multi-client/prod/spring-cloud-config-multi-client-prod.properties create mode 100644 spring-cloud-config-multi-client/spring-cloud-config-multi-client-dev.properties create mode 100644 spring-cloud-config-multi-client/spring-cloud-config-multi-client-prod.properties create mode 100644 spring-cloud-config-multi-client/spring-cloud-config-multi-client-test.properties create mode 100644 spring-cloud-config-multi-client/test/spring-cloud-config-multi-client-test.properties Simba@SIMBA MINGW64 /t/IDE/IDEA/Workspace-Learn/config-center ((af05c43...))
到此,相信大家对“Git怎么实现克隆历史的某个版本”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。