Want to merge in upstream/master into my master

Hi,

I’ve cloned a a big repository local. Now I want to merge the upstream - working on and the push.
Well, I was told to do a
git remote add upstream https://github.com/somboku/somboku.git

with the words:

" This will add the main applets repo as a remote. So origin will be your original repo, and upstream will be your main.

After that, all you need to do is to merge in upstream/master into your master , resolve any conflicts that arise, then push your master branch (to origin/master )."

and I dont know how to merge upstream/master into my master.
If i do again that git remote add upstream... it failes - of course. but It didnt download any new files that are commited but not merged as there are conflicts.
I also cant change the branch to upstream.
So you see, I am pretty new to all this.

Would somebody be that kind and help me out?

Thanks.
S.

Adding a remote only tells Git it exists, you need to fetch it to actually get data from the remote (or update any data you already have):

git fetch upstream

After that you can access the remote branches with the upstream/ prefix, and do things like git merge upstream/master.

See also:

thanks that helped a bit. No I have to move on how it helped. :slight_smile:

1 Like