"query"
]
},
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log",
+ "prompt": "Print the commits leading up to your current state.",
+ "answer": "git log",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log -p",
+ "prompt": [
+ "Print the commits leading up to your current state,",
+ "showing a patch for each commit."
+ ],
+ "answer": "git log -p",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log --stat",
+ "prompt": [
+ "Print the commits leading up to your current state,",
+ "showing the files changed by each commit."
+ ],
+ "answer": "git log --stat",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log --all",
+ "prompt": [
+ "Print every commit in your repository reachable from a reference",
+ "(e.g from any tag or branch)"
+ ],
+ "answer": "git log --all",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git checkout -b more-widgets",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'",
+ "git checkout master"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query",
+ "branch"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log --oneline",
+ "prompt": [
+ "Print the commits leading up to your current state,",
+ "with each commit only using a single line."
+ ],
+ "answer": "git log --oneline",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log --oneline --graph",
+ "prompt": [
+ "Print the commits leading up to your current state,",
+ "with each commit only using a single line",
+ "and an ASCII-art inheritence graph."
+ ],
+ "answer": "git log --oneline --graph",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query"
+ ]
+ },
+ {
+ "class": "ScriptQuestion",
+ "interpreter": "sh",
+ "id": "git log --oneline --decorate",
+ "prompt": [
+ "Print the commits leading up to your current state,",
+ "with each commit only using a single line",
+ "and reference (e.g. tag and branch) names before the summary"
+ ],
+ "answer": "git log --oneline --decorate",
+ "setup": [
+ "export GIT_AUTHOR_NAME='A U Thor'",
+ "export GIT_AUTHOR_EMAIL=author@example.com",
+ "export GIT_COMMITTER_NAME='C O Mitter'",
+ "export GIT_COMMITTER_EMAIL=committer@example.com",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:00:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "git init",
+ "echo 'This project is wonderful' > README",
+ "echo 'Lots of widgets' > widgets",
+ "git add README widgets",
+ "git commit -m 'Add some widgets'",
+ "export GIT_AUTHOR_DATE=1970-01-01T00:01:00Z",
+ "export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"",
+ "echo 'Take a look in the widgets file.' >> README",
+ "echo 'Widget-1 should be blue' >> widgets",
+ "git commit -am 'More widgets'"
+ ],
+ "help": "http://www.kernel.org/pub/software/scm/git/docs/git-log.html",
+ "tags": [
+ "query",
+ "branch"
+ ]
+ },
{
"class": "ScriptQuestion",
"interpreter": "sh",