5 "class": "ScriptQuestion",
8 "prompt": "initialize a Git repository in a new `my-project` directory",
18 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-init.html"
21 "class": "ScriptQuestion",
24 "prompt": "clone git://github.com/wking/quizzer.git into a new `quizzer` directory",
25 "answer": "git clone git://github.com/wking/quizzer.git",
30 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-clone.html"
33 "class": "ScriptQuestion",
35 "id": "git add / commit",
36 "prompt": "there is a new README file in your repository.\nmake a new commit including this README.\nthe commit message should be `Add a README`",
41 "git commit -m \"Add a README\""
44 "export GIT_AUTHOR_NAME='A U Thor'",
45 "export GIT_AUTHOR_EMAIL=author@example.com",
46 "export GIT_COMMITTER_NAME='C O Mitter'",
47 "export GIT_COMMITTER_EMAIL=committer@example.com",
48 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
49 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
51 "echo 'This project is wonderful' > README"
57 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-add.html\nhttp://www.kernel.org/pub/software/scm/git/docs/git-commit.html"
60 "class": "ScriptQuestion",
62 "id": "git checkout HEAD -- FILE",
63 "prompt": "you've messed up your README file.\nrestore it to the last committed version",
64 "answer": "git checkout HEAD -- README",
66 "export GIT_AUTHOR_NAME='A U Thor'",
67 "export GIT_AUTHOR_EMAIL=author@example.com",
68 "export GIT_COMMITTER_NAME='C O Mitter'",
69 "export GIT_COMMITTER_EMAIL=committer@example.com",
70 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
71 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
73 "echo 'This project is wonderful' > README",
75 "git commit -am 'Add a README'",
76 "echo 'This project is terrible' > README"
82 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html"