2021年4月3日 星期六

[Git 常見問題] How to update a forked repo with git rebase

 Source From Here

Step 1: Add the remote (original repo that you forkedand call it “upstream”
# git remote add upstream https://github.com/original-repo/goes-here.git

Step 2: Fetch all branches of remote upstream
# git fetch upstream

Step 3: Rewrite your master with upstream’s master using git rebase.
# git rebase upstream/master

Step 4: Push your updates to master. You may need to force the push with “--force”.
# git push origin master --force


沒有留言:

張貼留言

[Git 常見問題] error: The following untracked working tree files would be overwritten by merge

  Source From  Here 方案1: // x -----删除忽略文件已经对 git 来说不识别的文件 // d -----删除未被添加到 git 的路径中的文件 // f -----强制运行 #   git clean -d -fx 方案2: 今天在服务器上  gi...