Skip to content

Commit 8667d88

Browse files
committed
增加拉取代码的说明
1 parent 08f1742 commit 8667d88

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,19 @@ pip install when-changed
218218

219219
[contributors](https://github.com/PegasusWang/python_data_structures_and_algorithms/graphs/contributors)
220220

221+
## 如何更新代码(写给不熟悉 git 的同学)
222+
如果你直接 clone 的本项目的代码仓库,可以直接使用 `git pull origin master` 拉取更新。
223+
如果你先 fork 到了自己的仓库,然后 clone 到本地的是你自己的仓库,你可以编辑本地项目的 `.git/config`
224+
增加如下配置:
225+
226+
```sh
227+
[remote "pegasuswang"]
228+
url = https://github.com/PegasusWang/python_data_structures_and_algorithms.git
229+
fetch = +refs/heads/*:refs/remotes/origin/*
230+
```
231+
232+
然后使用 `git pull pegasuswang master` 拉取更新。
233+
221234
## 如何提问?
222235
如果读者关于代码、视频、讲义有任何疑问,欢迎一起讨论
223236
请注意以下几点:

0 commit comments

Comments
 (0)