File tree Expand file tree Collapse file tree 3 files changed +55
-21
lines changed
Expand file tree Collapse file tree 3 files changed +55
-21
lines changed Original file line number Diff line number Diff line change @@ -42,4 +42,51 @@ git merge editing
4242
4343```
4444git log --all --decorate --oneline --graph
45- ```
45+ ```
46+
47+ # 真实案例
48+
49+ 以 [ Python-Tutorial-for-Humans] ( https://github.com/imcda/Python-Tutorial-for-Humans )
50+
51+ ## 问题一:回退版本
52+
53+ 当我开始尝试一些 Github 网页版的操作的时候,经常会对远程仓库造成改变,而我的本地仓库没有变化,这个时候就存在不一致的问题了。如果我尝试的结果,不是我需要的,我就会选择回退版本,方法如下:
54+
55+ 1 . 本地仓库同步拉取远程仓库
56+
57+ 2 . 本地仓库查看版本记录
58+
59+ 执行
60+ ```
61+ git log
62+ ```
63+ 可以得到需要回退版本的 hash value
64+
65+ 3 . 本地仓库执行回退版本
66+
67+ 执行
68+ ```
69+ git reset --hard XXXhash valueXXX
70+ ```
71+
72+ 4 . 本地仓库推送远程仓库
73+
74+ 执行
75+ ```
76+ git push -f
77+ ```
78+
79+ 用` -f ` 的原因是,本地目前跟远程是不一致的,但是你希望远程跟本地一样,因此这样操作。
80+
81+ ** 思考**
82+ 写到这里,我发现一个问题,如果我不拉取,不回退,直接 force push 是不是也可以,也就是在目前只有我修改了一处,又只有我在push的情况下比较合适,否则,还是要同步拉取一下远程仓库比较合适,看看到底要要回退到哪个版本。
83+
84+
85+ ## 问题二:多了一个提问模板
86+
87+ 我通过页面操作新增一个提问模版
88+
89+
90+ editing 分支没有 merge master 分支。
91+
92+ 在编辑过 editing 分支后,回到 master 分支,使用 merge,需要输入 merge 的理由,然后 merge 成功后
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66
77** Python Tutorial for Humans™,适合新人、免费、中文、零基础、快速入门的 Python 教程。**
88
9- ![ pth-feature-picture] ( https://pptwinpics.oss-cn-beijing.aliyuncs.com/pth-feature-picture_20191123171828.jpg )
9+ ![ pth-feature-picture] ( https://pptwinpics.oss-cn-beijing.aliyuncs.com/python-tutorial-banner-tiny_20191215205306.webp )
1010
1111> 教是最好的学!
1212
4040如何用好这个教程?
4141
4242## :video_game : 跟着练
43- 1 . 你可以直接下载教程到你本地
44- 2 . 阅读完前两章安装好 Python ,我们用的是 Anaconda,就是把它装好
45- 3 . 然后打开 Jupyter Notebook 跟着开始操作
43+ 1 . 你可以点击 [ 下载教程 ] ( https://github.com/imcda/Python-Tutorial-for-Humans/archive/master.zip ) 到本地
44+ 2 . 参考 [ 《001-Anaconda 安装及操作》 ] ( https://github.com/imcda/ Python-Tutorial-for-Humans/blob/master/002-%E5%AE%89%E8%A3%85%20Python/001- Anaconda%20%E5%AE%89%E8%A3%85%E5%8F%8A%E6%93%8D%E4%BD%9C.md ) 教程,用最方便的方式安装 Python 环境
45+ 3 . 参考 [ ] ( ) 打开 Jupyter Notebook 跟着操作
4646
4747## :microphone : 提问题
48- 你可以在这里 [ 开一个 ` issue ` ] ( https://github.com/imcda/Python-Tutorial-for-Humans/issues ) 提问 ,我会及时查看,热心的同学们也会帮你解答。
48+ 你可以提交 [ ` issue ` ] ( https://github.com/imcda/Python-Tutorial-for-Humans/issues ) ,我会及时查看,热心的同学们也会帮你解答。
4949
5050## :beer : 找同学
5151如果因为这份教程而成为同学,那就一起开始学习编程之旅,不分年龄,不分地区。
5252
53-
5453# 教程作者
5554曹 鑫
55+
5656CDA 数据分析师人才教育品牌联合创始人
5757> 学数据科学,上 [ CDA.cn] ( http://cda.cn )
5858
@@ -63,7 +63,7 @@ Email = f'caoxin{at}cda.cn'
6363```
6464# 教程参与
6565
66- 在我完成第1版的大部分内容后 ,我将其发布在` master ` 分支作为稳定发布版本,供大家下载。
66+ 在我完成第 1 版的大部分内容后 ,我将其发布在` master ` 分支作为稳定发布版本,供大家下载。
6767
6868之后我将在` editing ` 分支继续增加和优化内容,如果你也希望参与写作,或者提供一些修改意见,请在` editing ` 分支修改后提交` pull request ` ,我将认真核对并通过,谢谢合作。
6969
You can’t perform that action at this time.
0 commit comments