How to start using Github for Three.js development?

Hi all,

I’d like to get started on Github. This is what I’ve already done:

Created

  • a Github account,
  • a first, empty repository.
  • an access token.

I also followed this instruction
https://github.com/mrdoob/three.js/wiki/Build-instructions
and successfully built three.js on my local computer.

Between the above and the first two instructions of this document:
https://github.com/mrdoob/three.js/wiki/An-introduction-to-using-Git
there seems to be a gap.

This is what I’m stuck with:

> three@0.134.0 build
> rollup -c utils/build/rollup.config.js


src/Three.js → build/three.module.js...
created build/three.module.js in 1.8s

src/Three.js → build/three.js...
created build/three.js in 4.6s

src/Three.js → build/three.min.js...
created build/three.min.js in 6.4s


Chrissies-iMac:three.js chris$ git checkout dev
M	build/three.js
M	build/three.min.js
M	build/three.module.js
M	package-lock.json
Already on 'dev'
Your branch is up to date with 'origin/dev'.

Chrissies-iMac:three.js chris$ git pull upstream dev
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Chrissies-iMac:three.js chris$ 

It looks like my local build and the Three.js dev repository(?), branch(?), whatever(?) are not connected with each other.

Thanks for any hints or pointers to further reading.

The guide An introduction to using Git · mrdoob/three.js Wiki · GitHub assumes you are forking the repository. Have you actually done that?

1 Like

Thank you for your pointer - I’ll study it.

Honestly: I can’t tell. I followed both mentioned instructions exactly, with to the letter precision. As far as possible.

I’m unable to point out any errors or ommissions in those instructions, as long as I don’t know how it should have been done.

May I suggest, the authors of of the above instructions review their writing in that light?

Well it makes difference if you just want to build the project or file a PR. For the latter one, one should fork the project.

Thinking about it, while I was walking the dog, the sequence of events was a little different, although still with “to the letter” precision:

When I started out, I didn’t have a Github account, repository and access token.

First I followed Mr.Doobs “Build-instruction”.

Followed by joining Github and all that.

Finally tried the steps of “An-introduction-to-using-Git”.

Maybe that’s why the connection could not be established.

Anyway, I’ll read-up and maybe I’ll come back if questions remain. Thanks for now.

Now I see, that you posted the exact same instruction that I was unable to follow.

The first recommended command in the document is:

$ git checkout dev # switch to dev branch

And I just can’t believe, that mrdoob’s “dev” branch would be the only “dev” around the whole of Github.

Obviously, the instruction takes some preconditions re. the environment for granted, which are not mentioned and which I’m unable to guess.

This diverging piece of info from StackExchange (see 2nd answer) resolved the block:

* 'upstream' is the conceptual(!) name of the remote repository (or repositories) 
  that exist. Most projects only have one upstream repository.
* The (actual!) name of the upstream repository can vary from project to 
  project, but by convention is 'origin'.

So I changed the previously failing command as follows:

Chrissies-iMac:three.js chris$ git pull 'origin' dev
From https://github.com/mrdoob/three.js
 * branch            dev        -> FETCH_HEAD
Already up to date.

Quotes only added to highlight the change, they were not part of the entered command.

After that I was able to proceed with the instructions.