Sublime Forum

How do I update my fork to the latest remote commit from the original repository?

#1

I forked a github repo, cloned it and am now 10 commits behind. I already tried to fetch from REMOTES > origin > master, checked out origin/master then pushed to remote master. Still on github it says 10 commits behind. :confused:

How do I update my fork to the latest remote commit from the original repository?

0 Likes

#2

Your origin remote is actually your repo on GitHub, not the repo from which you forked. You need to add these repo as an another remote.

1 Like

#3

that makes sense. I did confuse my remote fork with the original remote.

Hereā€™s an update of my config:

[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
[remote "origin"]
	url = https://github.com/usig/Boostnote.git
	fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
	remote = origin
	merge = refs/heads/master
[branch "fix51"]
	remote = origin
	merge = refs/heads/fix51
[remote "BoostIO"]
	url = https://github.com/BoostIO/Boostnote.git
	fetch = +refs/heads/*:refs/remotes/BoostIO/*

and hereā€™s how my local looks like:

image

to me it looks like head, master and remotes are even. I fetched all from BoostIO, checked out origin/master and merged BoostIO into master. Still no change on GitHub!

0 Likes

#4

do I have to create local branch from BoostIO:master? I canā€™t because my fork already has a branch called master.

0 Likes

#5

You generally do not need to create a branch for the BoostIO branch, since your master branch should ultimately be aligned with the boostIO master branch, you just need to merge this remote branch into your branch.
And also you can have a local branch name different from a remote branch name (see git doc on ā€œupstream branchā€)

0 Likes