5 "class": "ScriptQuestion",
7 "id": "git config --global user.name",
8 "prompt": "configure your user-wide name to be `A U Thor`",
9 "answer": "git config --global user.name 'A U Thor'",
16 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-config.html"
19 "class": "ScriptQuestion",
21 "id": "git config --global user.email",
22 "prompt": "configure your user-wide email to be `author@example.com`",
23 "answer": "git config --global user.email 'author@example.com'",
30 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-config.html"
33 "class": "ScriptQuestion",
36 "prompt": "initialize a Git repository in a new `my-project` directory",
46 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-init.html"
49 "class": "ScriptQuestion",
52 "prompt": "clone git://github.com/wking/quizzer.git into a new `quizzer` directory",
53 "answer": "git clone git://github.com/wking/quizzer.git",
58 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-clone.html"
61 "class": "ScriptQuestion",
63 "id": "git add / commit",
64 "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`",
69 "git commit -m \"Add a README\""
72 "export GIT_AUTHOR_NAME='A U Thor'",
73 "export GIT_AUTHOR_EMAIL=author@example.com",
74 "export GIT_COMMITTER_NAME='C O Mitter'",
75 "export GIT_COMMITTER_EMAIL=committer@example.com",
76 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
77 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
79 "echo 'This project is wonderful' > README"
85 "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"
88 "class": "ScriptQuestion",
90 "id": "git checkout HEAD -- FILE",
91 "prompt": "you've messed up your README file.\nrestore it to the last committed version",
92 "answer": "git checkout HEAD -- README",
94 "export GIT_AUTHOR_NAME='A U Thor'",
95 "export GIT_AUTHOR_EMAIL=author@example.com",
96 "export GIT_COMMITTER_NAME='C O Mitter'",
97 "export GIT_COMMITTER_EMAIL=committer@example.com",
98 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
99 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
101 "echo 'This project is wonderful' > README",
103 "git commit -am 'Add a README'",
104 "echo 'This project is terrible' > README"
110 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html"
113 "class": "ScriptQuestion",
115 "id": "git commit --amend",
116 "prompt": "you messed up your README file in your last commit.\nyou just fixed the contents of `README`, but haven't added it to the index.\ncommit the new version so it also fixes the last commit.\nthe fixed commit message should be `Add a README`.",
120 "git commit --amend -am 'Add a README'"
123 "export GIT_AUTHOR_NAME='A U Thor'",
124 "export GIT_AUTHOR_EMAIL=author@example.com",
125 "export GIT_COMMITTER_NAME='C O Mitter'",
126 "export GIT_COMMITTER_EMAIL=committer@example.com",
127 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
128 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
130 "echo 'This project is terrible' > README",
132 "git commit -am 'Add a README'",
133 "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
134 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
135 "echo 'This project is wonderful' > README"
141 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-commit.html"