Skip to content

Instantly share code, notes, and snippets.

@shiraji
Last active April 15, 2016 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiraji/b08e23ef777a32691ecfa9b9ae53484a to your computer and use it in GitHub Desktop.
Save shiraji/b08e23ef777a32691ecfa9b9ae53484a to your computer and use it in GitHub Desktop.
{
"goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C2\",\"id\":\"master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"}},\"tags\":{},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
"solutionCommand": "git commit",
"startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"tags\":{},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}",
"name": {
"en_US": "Git勉強会"
},
"hint": {
"en_US": ""
},
"startDialog": {
"en_US": {
"childViews": [
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"## revert",
"",
"revertは逆コミットをすることです。"
],
"afterMarkdowns": [
"revertをしたことによってC1の\"修正を消した\"。",
"",
"C1というコミット自体は残っているのでいつでも復活できる。"
],
"command": "git revert C1",
"beforeCommand": "git commit;"
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"## cherry-pick",
"",
"cherry-pickはいらなくなったブランチからこのコミットだけ残したい!というときに便利です。",
"",
"ver101を先にリリースするけど、C2だけはver101に必要。という状況だった場合",
""
],
"afterMarkdowns": [
"これでC2を生かすことができました。"
],
"command": "git cherry-pick C2",
"beforeCommand": "git checkout -b ver100;git commit;git commit;git checkout master;git checkout -b ver101; git commit; "
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"## reset",
"",
"HEADの位置を変更する。stageへの上げ下げも。"
],
"afterMarkdowns": [
"HEADの位置がC2->C1へ移動しました。"
],
"command": "git reset HEAD^",
"beforeCommand": "git commit"
}
},
{
"type": "GitDemonstrationView",
"options": {
"beforeMarkdowns": [
"## reset",
"",
"HEADが動いただけだから、merge出来たりしちゃう!"
],
"afterMarkdowns": [
"(ただまぁこんなこと今後しないと思うけどね)"
],
"command": "git merge C2",
"beforeCommand": "git commit;git reset HEAD^;"
}
}
]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment