您好,登錄后才能下訂單哦!
本篇內容主要講解“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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。