Branches, Forks, Clones? oh my

AaronLS

New Member
So I forked terasology and have gotten it to a compilable/runnable state. YAY!

I'm pretty well versed in source control, but haven't used distributed source control like github.

1) When I forked Terasology, am I correct in understanding that fork in github terms is just a clone of the remote Terasology repo to my own repo?

2) My fork includes all Terasology branches, correct? At first I wasn't sure if my fork was just a clone of a specific branch, but I see now under my github fork there is a menu to switch between forks.

3) At the bottom-right of IntelliJ there is a menu listing all of all the branches, and they are listed as things like origin/dev. According to the wiki, origin would be the Terasology repo. Is this the case even in the context of my local machine? I.e. relative to my local machine repo, I was wondering if origin might be my remote AaronLS/Terasology repo, since that is one clone "hop" backwards from my local machine.

Thanks.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Hey AaronLS, welcome to the forum. :)

As far as I know »origin« refers to your fork of the project, but you can add remote repos, e.g. a »movingblocks« remote for the original project like described in the Dev-Setup (--> Development section).
If you want to learn more about git, I can recommend this video introduction to you.

So far, I wish you a merry christmas and some nice days ;)
 

pencilcheck

New Member
Contributor
Try something like
`git remote -v`
And see the output, you might be able to tell which alias (such as origin) is pointed to
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hi AaronLS - Git & GitHub can indeed take some getting used to, I had never used them either before Terasology :)

To the best of my understanding (which may still be lacking) a "Fork" specifically means your repo on GitHub forked from somebody else. "Cloning" is the process by which you take a remote repo (which can be yours, the root at MovingBlocks, etc) and make a local copy of it. Although I suppose in theory a fork is also a clone - I just tend to think in terms of a split between remote GitHub stuff and local stuff :geek:

Origin is always a reference to where you cloned from, our guide often ends up with that meaning the MovingBlocks repo since a few of us may work directly with that rather than in a personal fork. So yeah, be sure to add a "movingblocks" reference in addition to your personal origin

As for branches, yes you get all of ours. Over time as branches get deleted you'll still end up with obsolete references until you prune, there's a note about that in the wiki too. Speaking of, we need to clean up the branches :D

Welcome!
 
Top