github上fork了一个repo,这个repo是复制了一份到我的账号里
如果原始项目的某个分支update了,我fork过来的repo会自动更新吗?
很多同学没理解我意思,是这样,fork一个project之后
git remote add upstream git_url
此时git branch -a假设输出:
master
origin/master
origin/dev
upstream/master
upstream/dev
如果运行git fetch upstream则upstream的各个分支被更新了,但我fork的分支
origin/master
origin/dev
却并没有更新,是不是更新所有origin分支都需要merge之后手动push?
如果project的branch很多,岂不非常麻烦?
If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:
First, specify the original warehouse as upstream:
Execute the command mentioned above again: