- I forked a repo on GitLab
- Cloned my fork to my local machine
- Made some changes, then pushed to my fork.
- Some changes have been made on the original repo and I want to
git pull
so everything is up to date.
这可能吗?
I've tried git pull
and git pull origin master
and got everything is up-to-date. (makes sense)
git pull upstream
gave me the following message:
您要求从远程“上游”拉出,但未指定 分店。
我不知道如何指定这些分支,我尝试过的所有东西都不返回分支。但是我觉得这是正确的方向。
分行:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
I'm not sure the difference between these two branches. Or which one is the original repo to begin. I'm all out of git pull
ideas and feel there might be something else I'm missing?
方法1
方法二 1.进入项目的根目录。 2.从上游存储库中获取分支及其各自的提交。提交给master的内容将存储在本地分支(上游/ master)中。
4.将更改从上游/主服务器合并到本地主服务器分支。这使fork的master分支与上游存储库同步,而不会丢失本地更改。