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",
22 "class": "ScriptQuestion",
24 "id": "git config --global user.email",
25 "prompt": "Configure your user-wide email to be `author@example.com`.",
26 "answer": "git config --global user.email 'author@example.com'",
33 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-config.html",
39 "class": "ScriptQuestion",
42 "prompt": "Initialize a Git repository in a new `my-project` directory.",
52 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-init.html",
58 "class": "ScriptQuestion",
61 "prompt": "Clone git://github.com/wking/quizzer.git into a new `quizzer` directory.",
62 "answer": "git clone git://github.com/wking/quizzer.git",
67 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-clone.html",
73 "class": "ScriptQuestion",
75 "id": "git add / commit",
77 "There is a new README file in your repository.",
78 "Make a new commit including this README.",
79 "The commit message should be `Add a README`."
85 "git commit -m \"Add a README\""
88 "export GIT_AUTHOR_NAME='A U Thor'",
89 "export GIT_AUTHOR_EMAIL=author@example.com",
90 "export GIT_COMMITTER_NAME='C O Mitter'",
91 "export GIT_COMMITTER_EMAIL=committer@example.com",
92 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
93 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
95 "echo 'This project is wonderful' > README"
101 "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",
108 "class": "ScriptQuestion",
110 "id": "git checkout HEAD -- FILE",
112 "You've messed up your README file.",
113 "Restore it to the last committed version."
115 "answer": "git checkout HEAD -- README",
117 "export GIT_AUTHOR_NAME='A U Thor'",
118 "export GIT_AUTHOR_EMAIL=author@example.com",
119 "export GIT_COMMITTER_NAME='C O Mitter'",
120 "export GIT_COMMITTER_EMAIL=committer@example.com",
121 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
122 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
124 "echo 'This project is wonderful' > README",
126 "git commit -am 'Add a README'",
127 "echo 'This project is terrible' > README"
133 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html",
139 "class": "ScriptQuestion",
141 "id": "git commit --amend",
143 "You messed up your README file in your last commit.",
144 "You just fixed the contents of `README`, but haven't added it to the index.",
145 "Commit the new version so it also fixes the last commit.",
146 "The fixed commit message should be `Add a README`."
151 "git commit --amend -am 'Add a README'"
154 "export GIT_AUTHOR_NAME='A U Thor'",
155 "export GIT_AUTHOR_EMAIL=author@example.com",
156 "export GIT_COMMITTER_NAME='C O Mitter'",
157 "export GIT_COMMITTER_EMAIL=committer@example.com",
158 "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
159 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
161 "echo 'This project is terrible' > README",
163 "git commit -am 'Add a README'",
164 "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
165 "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
166 "echo 'This project is wonderful' > README"
172 "help": "http://www.kernel.org/pub/software/scm/git/docs/git-commit.html",