フォークをセットアップする#

まず、 Matplotlib の独自のコピー (フォーク) を作成する の手順に従います

概要#

git clone https://github.com/your-user-name/matplotlib.git
cd matplotlib
git remote add upstream https://github.com/matplotlib/matplotlib.git

詳細に#

フォークのクローン#

  1. フォークをローカル コンピューターに複製します。git clone https://github.com/your-user-name/matplotlib.git

  2. 調査。ディレクトリを新しいリポジトリに変更します: . 次に 、すべてのブランチを表示します。次のようなものが得られます。cd matplotlibgit branch -a

    * main
    remotes/origin/main
    

    これは、現在mainブランチにいて、 にもremote接続していることを示していますorigin/main。リモートリポジトリとはremote/origin? リモートの URL を確認してみてください。それらはあなたの github フォークを指します。git remote -v

    ここで、上流のMatplotlib githubリポジトリに接続して、トランクからの変更をマージできるようにします。

リポジトリをアップストリーム リポジトリにリンクする#

cd matplotlib
git remote add upstream https://github.com/matplotlib/matplotlib.git

upstreamこれは、 Matplotlib githubのメインのMatplotlibリポジトリを参照するために使用している任意の名前です。

あなた自身の満足のために、あなたが新しい「リモート」を持っていることを自分自身に示してください。git remote -v show

upstream     https://github.com/matplotlib/matplotlib.git (fetch)
upstream     https://github.com/matplotlib/matplotlib.git (push)
origin       https://github.com/your-user-name/matplotlib.git (fetch)
origin       https://github.com/your-user-name/matplotlib.git (push)