📌  相关文章
📜  使用 master 重新设置分叉分支 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:08.283000             🧑  作者: Mango

代码示例2
git checkout master # Make sure you are in master
git remote add author original_repo_that_you_forked_from
    # Note: This is in the format git@github.com:authors_name/repo_name.git
    #       Only needs definition once, future fetches then use it. 
git fetch author
git status # make sure you are in the master branch for the following merge
git merge author/master  # i.e. 'into' your master branch
git checkout your-branch
git rebase master        # Now get those changes into your branch.
git push origin your_branch # You can also use `-f` if necessary and `--all`