Git推上游

dmb*_*dmb 7 git github

我已经尝试过寻找答案,但找不到合适的答案.

我正在运行下面的代码.

git fetch upstream  # get the latest copy from master / upstream
git merge upstream/master  # merge the downloaded copies and merge to your copy
git commit -am"test"  # commit your latest changes
git push origin master  # push to your fork
git push upstream  # push to master copy from where you forked your project - is this safe?
Run Code Online (Sandbox Code Playgroud)

推送到上游(git push upstream)是否安全?我的主要目标是将我的更改从我的fork应用到主项目.还是有更好的方法?谢谢

Ola*_*che 2

这取决于你是否有推送权限。如果还没有,请要求上游存储库的所有者从您的分支中提取。