Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • I tried this and no PR was created, cool! And if your branch can be synced with a fast-forward merge, no divergence will occur.
    – li ki
    Commented May 7, 2021 at 23:44
  • 3
    For now, this function will first compare the branch name between the original and the forked repos. If the same name is found, the upstream of the branch in the fork is the branch with the same name in the original; if it is not found, the upstream will be the default branch (HEAD) of the original. This works fine in most cases, but if some branch modification has occurred in the original repo (e.g., adding or deleting a branch with the same name which already exists in the forked repo, or changing the default branch), the result of the sync may not match you expectations.
    – li ki
    Commented May 8, 2021 at 0:31