Skip to content

Instantly share code, notes, and snippets.

@zhangguanzhang
Created March 2, 2022 02:54
Show Gist options
  • Select an option

  • Save zhangguanzhang/fdb4d3addec113741b8a4e3365f44b48 to your computer and use it in GitHub Desktop.

Select an option

Save zhangguanzhang/fdb4d3addec113741b8a4e3365f44b48 to your computer and use it in GitHub Desktop.

Revisions

  1. zhangguanzhang created this gist Mar 2, 2022.
    21 changes: 21 additions & 0 deletions github-fork-pr.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    fork 后本地仓库添加,这里例如 skopeo

    1. 先添加上游

    ```
    git remote add upstream https://github.com/containers/skopeo.git
    ```

    2. 拉取上游

    ```
    git fetch upstream
    ```

    3. 把上游的 main 合并到本地 main

    ```
    git rebase upstream/main
    ```

    然后 `check -b` 一个新分支改了提交,后续 main 分支按照 `2,3` 步骤操作同步