Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
1b8803cc
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1b8803cc
编写于
10月 16, 2020
作者:
S
storypku
提交者:
Liu Jiaming
10月 16, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docs: added Chinese version of How To Clone Apollo Repo from China
上级
effcbc35
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
82 addition
and
3 deletion
+82
-3
docs/howto/README.md
docs/howto/README.md
+2
-1
docs/howto/how_to_clone_apollo_repo_from_china.md
docs/howto/how_to_clone_apollo_repo_from_china.md
+0
-0
docs/howto/how_to_clone_apollo_repo_from_china_cn.md
docs/howto/how_to_clone_apollo_repo_from_china_cn.md
+78
-0
docs/quickstart/apollo_software_installation_guide.md
docs/quickstart/apollo_software_installation_guide.md
+1
-1
docs/quickstart/apollo_software_installation_guide_cn.md
docs/quickstart/apollo_software_installation_guide_cn.md
+1
-1
未找到文件。
docs/howto/README.md
浏览文件 @
1b8803cc
...
...
@@ -63,8 +63,9 @@
## Others
-
[
How to generate and push images into Docker
](
how_to_generate_and_push_docker_images.md
)
-
[
How to clone Apollo repository from C
N
](
how_to_clone_apollo_repo_from_cn
.md
)
-
[
How to clone Apollo repository from C
hina
](
how_to_clone_apollo_repo_from_china
.md
)
### Chinese versions
-
[
How to generate and push images into Docker
](
how_to_generate_and_push_docker_images_cn.md
)
-
[
国内环境下如何克隆Apollo 仓库
](
how_to_clone_apollo_repo_from_china_cn.md
)
-
[
How to solve slow pull from CN
](
how_to_solve_slow_pull_from_cn.md
)
docs/howto/how_to_clone_apollo_repo_from_c
n
.md
→
docs/howto/how_to_clone_apollo_repo_from_c
hina
.md
浏览文件 @
1b8803cc
文件已移动
docs/howto/how_to_clone_apollo_repo_from_china_cn.md
0 → 100644
浏览文件 @
1b8803cc
# 国内环境下如何克隆 Apollo 仓库
本文档描述了在国内环境下既快又好地克隆Apollo 仓库的方法。
## 必要前提/准备
-
假设你已经 「fork」 了GitHub上的Apollo 代码库。这可以通过点击
[
GitHub上的 Apollo
](
https://github.com/ApolloAuto/apollo.git
)
页面右上角的「Fork」按钮并遵照随后的提示来完成。
## 首先,从码云上克隆 Apollo 仓库
[
码云上的 Apollo仓库
](
https://gitee.com/baidu/apolloauto.git
)
通常比
[
GitHub上的 Apollo仓库
](
https://github.com/ApolloAuto/apollo.git
)
更新晚一个月左右。
我们可以以它为起点,克隆码云上的Apollo 仓库。
执行命令:
```
bash
git clone https://gitee.com/baidu/apolloauto.git apollo
```
这一步通常很快,只需十数分钟。在本文作者所在的百度内部,下载速度可达 10 多 MiB/s,终端输出如下:
```
text
Cloning into 'apollo'...
remote: Enumerating objects: 313277, done.
remote: Counting objects: 100% (313277/313277), done.
remote: Compressing objects: 100% (66199/66199), done.
remote: Total 313277 (delta 245822), reused 310653 (delta 243198), pack-reused 0
Receiving objects: 100% (313277/313277), 2.19 GiB | 11.10 MiB/s, done.
Resolving deltas: 100% (245822/245822), done.
Checking out files: 100% (9124/9124), done.
```
## 重置远程分支origin
上述步骤完成后,就可以「过河拆桥」,将远程分支 origin 重置为你刚 「fork」的GitHub 分支。
```
bash
git remote set-url origin git@github.com:<你的GitHub 用户名>/apollo.git
```
## 将 GitHub 上的 Apollo 仓库设为远程分支upstream
```
bash
# 采用SSH的方式
git remote add upstream git@github.com:ApolloAuto/apollo.git
# 采用HTTPS的方式
git remote add upstream https://github.com/ApolloAuto/apollo.git
```
你可以运行如下命令来确认远程分支 origin 和 upstream 已被正确设置:
```
bash
git remote
-v
```
如果之前的操作正确,它将列出如下的远端分支:
```
text
origin git@github.com:<你的GitHub 用户名>/apollo.git (fetch)
origin git@github.com:<你的GitHub 用户名>/apollo.git (push)
upstream git@github.com:ApolloAuto/apollo.git (fetch)
upstream git@github.com:ApolloAuto/apollo.git (push)
```
## 现在,从 GitHub 远程分支upstream 拉取最新的「增量」代码
```
bash
git pull
--rebase
upstream master
```
如果遇到问题,你可以参考这篇文档:
[
如何解决国内拉取 GitHub仓库太慢的问题
](
how_to_solve_slow_pull_from_cn.md
)
.
## 结语
恭喜你成功地克隆了 Apollo Gitee/GitHub 仓库,并由此开启你的 Apollo 自动驾驶之旅!
docs/quickstart/apollo_software_installation_guide.md
浏览文件 @
1b8803cc
...
...
@@ -35,7 +35,7 @@ git checkout master
```
For CN users, please refer to
[
How to Clone Apollo Repository from C
N
](
../howto/how_to_clone_apollo_repo_from_cn
.md
)
[
How to Clone Apollo Repository from C
hina
](
../howto/how_to_clone_apollo_repo_from_china
.md
)
if your have difficulty cloning from GitHub.
(Optional) For convenience, you can set up environment variable
...
...
docs/quickstart/apollo_software_installation_guide_cn.md
浏览文件 @
1b8803cc
...
...
@@ -28,7 +28,7 @@ cd apollo
git checkout master
```
对于中国用户, 如果
你难以从GitHub克隆,请参考
[
如何在中国克隆Apollo仓库
](
../howto/how_to_clone_apollo_repo_from
_cn.md
)
。
对于中国用户, 如果
从GitHub克隆仓库有困难,可参考
[
国内环境下如何克隆Apollo仓库
](
../howto/how_to_clone_apollo_repo_from_china
_cn.md
)
。
(可选)为方便起见,可以在Apollo的根目录运行以下命令来设置指向该目录的环境变量
`APOLLO_ROOT_DIR`
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录