设置#

安装和设置 Git#

Arrow 项目使用 Git 进行版本控制开发,Git 适用于所有常见的操作系统。

您可以按照 GitHub 上的说明安装 Git,Arrow 存储库托管在此处,遵循快速入门说明

设置 Git 后,不要忘记配置您的姓名和电子邮件

$ git config --global user.name "Your Name"
$ git config --global user.email your.email@example.com

使用 GitHub 进行身份验证,这将允许您与 GitHub 交互,而无需每次执行 git 命令时都键入用户名和密码。

注意

本指南假设您熟悉命令行操作。一些 IDE 允许您管理 Git 存储库,但在这样做时可能会隐式运行不需要的操作(例如创建项目文件)。

例如,在 RStudio 中克隆它假定整个存储库是一个 RStudio 项目,并将在根目录中创建一个 .Rproj 文件。因此,强烈建议使用命令行或 Git 客户端克隆存储库。

获取源代码#

派生存储库#

Arrow GitHub 存储库包含 Arrow C++ 库以及 Go、Java、Matlab、Python、R 等其他语言的库。贡献的第一步是在您自己的 GitHub 帐户中创建存储库的派生。

  1. 转到 apache/arrow

  2. 点击右上角的 Fork。

    Fork the Apache Arrow repository on GitHub.

    在 GitHub 上派生 Apache Arrow 存储库的图标。#

  3. 选择将存储库派生到您的用户名,因此派生将在 https://github.com/<您的用户名>/arrow 创建。

克隆存储库#

接下来您需要克隆存储库

$ git clone https://github.com/<your username>/arrow.git

并将 Apache Arrow 存储库添加为名为 upstream 的远程。

$ cd arrow
$ git remote add upstream https://github.com/apache/arrow

验证您的上游#

您的上游应该指向 Arrow GitHub 存储库。

在 shell 中运行

$ git remote -v

应该会给您类似这样的结果

origin    https://github.com/<your username>/arrow.git (fetch)
origin    https://github.com/<your username>/arrow.git (push)
upstream  https://github.com/apache/arrow (fetch)
upstream  https://github.com/apache/arrow (push)

如果操作正确,您现在应该在 arrow 目录中拥有代码副本,以及两个指向您自己的 GitHub 派生 (origin) 和官方 Arrow 存储库 (upstream) 的远程。