overview of how cyber-dojo uses git

directory structure

cyber-dojo does not use a database. Instead each dojo lives in a folder based on its id. Your id appears to only be 6 characters long, but really it is 10 characters long - look at the page's URL in the browser's address bar.
For example the practice session with id 82B583C347 lives at folder
cyber-dojo/katas/82/B583C347
Each started animal has a sub-folder underneath this, eg
cyber-dojo/katas/82/B583C347/wolf
Each started animal has a sandbox sub-folder where its files are held, eg
cyber-dojo/katas/82/B583C347/wolf/sandbox


git repositories

Each started animal has its own git respository, eg
cyber-dojo/katas/82/B583C347/wolf/.git
The starting files (as loaded from the cyber-dojo/katas/82/B583C347/wolf/manifest.json file) form tag 0 (zero). Each [test] event causes a new git commit and git tag, with a message and tag which is simply its number. For example, the fourth time the wolf computer presses [test] causes
$ git commit -a -m '4' $ git tag -m '4' 4 HEAD
From the server, in an animal's folder you can issue the following commands: To look at filename for tag 4
$ git show 4:sandbox/filename
To look at filename's differences between tag 4 and tag 5
$ git diff 4 5 sandbox/filename
It's much easier and more informative to open a review by clicking any traffic light.

No comments:

Post a Comment