[{"data":1,"prerenderedAt":164},["ShallowReactive",2],{"wiki-page-/en-us/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti":3,"wiki-doc-items-/en-us/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti":124,"language-switcher-data-/en-us/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti":148,"wiki-i18n-paths-/en-us/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti":163},{"id":4,"title":5,"body":6,"canonicalPath":105,"chapter":106,"chapterSort":107,"date":108,"description":25,"docI18nKey":109,"docKey":110,"docRoot":111,"docTitle":112,"extension":113,"i18nKey":114,"isBlogPost":115,"isWikiDoc":35,"isWikiIndex":115,"layout":116,"legacyPath":116,"locale":117,"localeSlug":118,"meta":119,"navigation":35,"path":105,"seo":120,"sourcePath":121,"sourceStem":114,"stem":122,"wikiDepth":32,"__hash__":123},"content/_i18n/en-us/wiki/2023-12-29-Git教学/ch4-常见问题.md","Frequently Asked Questions",{"type":7,"value":8,"toc":101},"minimark",[9,19,66,70,76,79,94,97],[10,11,13,14,18],"h3",{"id":12},"if-you-want-to-cancel-a-commit-that-was-made-locally-you-can-use-git-reset-to-undo-it","If you want to cancel a commit that was made locally, you can use ",[15,16,17],"code",{},"git reset"," to undo it.",[20,21,26],"pre",{"className":22,"code":23,"language":24,"meta":25,"style":25},"language-Python shiki shiki-themes github-light github-dark","\n# 设置默认编辑器\ngit config --global core.editor vim\n\n# 使用交互式rebase\ngit rebase -i HEAD~2\n","Python","",[15,27,28,37,43,49,54,60],{"__ignoreMap":25},[29,30,33],"span",{"class":31,"line":32},"line",1,[29,34,36],{"emptyLinePlaceholder":35},true,"\n",[29,38,40],{"class":31,"line":39},2,[29,41,42],{},"# 设置默认编辑器\n",[29,44,46],{"class":31,"line":45},3,[29,47,48],{},"git config --global core.editor vim\n",[29,50,52],{"class":31,"line":51},4,[29,53,36],{"emptyLinePlaceholder":35},[29,55,57],{"class":31,"line":56},5,[29,58,59],{},"# 使用交互式rebase\n",[29,61,63],{"class":31,"line":62},6,[29,64,65],{},"git rebase -i HEAD~2\n",[67,68,69],"p",{},"If I don't want to submit \"add bishe\" anymore.",[67,71,72],{},[73,74],"img",{"alt":25,"src":75},"https://cdn.tungchiahui.cn/tungwebsite/assets/images/2023/12/29/image89.webp",[67,77,78],{},"You can modify the image above to:",[20,80,82],{"className":22,"code":81,"language":24,"meta":25,"style":25},"drop \u003Chash1> add bishe\npick \u003Chash2> update\n",[15,83,84,89],{"__ignoreMap":25},[29,85,86],{"class":31,"line":32},[29,87,88],{},"drop \u003Chash1> add bishe\n",[29,90,91],{"class":31,"line":39},[29,92,93],{},"pick \u003Chash2> update\n",[67,95,96],{},"Then exit the editor and it's done.",[98,99,100],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":25,"searchDepth":39,"depth":39,"links":102},[103],{"id":12,"depth":45,"text":104},"If you want to cancel a commit that was made locally, you can use git reset to undo it.","/en-us/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","4",4000000,"2023-12-29","wiki/2023-12-29-git-jiao-xue","en-us:2023-12-29-git-jiao-xue","/en-us/wiki/2023-12-29-git-jiao-xue","Git教学","md","wiki/2023-12-29-Git教学/ch4-常见问题",false,null,"en-US","en-us",{},{"title":5,"description":25},"/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","_i18n/en-us/wiki/2023-12-29-Git教学/ch4-常见问题","LjDzrJUUwxD2i_FKNTXwIkgjeYnaQNae7sxn4UIjIBU",[125,131,137,143,144],{"path":126,"stem":127,"title":128,"date":108,"chapter":129,"chapterSort":130,"docKey":110,"docRoot":111,"docTitle":112,"isWikiDoc":35,"isWikiIndex":115},"/en-us/wiki/2023-12-29-git-jiao-xue/ch1-git-jian-jie","_i18n/en-us/wiki/2023-12-29-Git教学/ch1-Git简介","Introduction to Git","1",1000000,{"path":132,"stem":133,"title":134,"date":108,"chapter":135,"chapterSort":136,"docKey":110,"docRoot":111,"docTitle":112,"isWikiDoc":35,"isWikiIndex":115},"/en-us/wiki/2023-12-29-git-jiao-xue/ch2-git-shi-cao","_i18n/en-us/wiki/2023-12-29-Git教学/ch2-Git实操","Git in Practice","2",2000000,{"path":138,"stem":139,"title":140,"date":108,"chapter":141,"chapterSort":142,"docKey":110,"docRoot":111,"docTitle":112,"isWikiDoc":35,"isWikiIndex":115},"/en-us/wiki/2023-12-29-git-jiao-xue/ch3-gao-ji-gong-ju","_i18n/en-us/wiki/2023-12-29-Git教学/ch3-高级工具","Advanced Tools","3",3000000,{"path":105,"stem":122,"title":5,"date":108,"chapter":106,"chapterSort":107,"docKey":110,"docRoot":111,"docTitle":112,"isWikiDoc":35,"isWikiIndex":115},{"path":111,"stem":145,"title":146,"date":108,"chapter":116,"chapterSort":147,"docKey":110,"docRoot":111,"docTitle":112,"isWikiDoc":35,"isWikiIndex":35},"_i18n/en-us/wiki/2023-12-29-Git教学/index","Git tutorial",0,{"variants":149},[150,151,154,157,160],{"path":105,"localeSlug":118,"i18nKey":114},{"path":152,"localeSlug":153,"i18nKey":114},"/zh-hant/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","zh-hant",{"path":155,"localeSlug":156,"i18nKey":114},"/zh-hk/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","zh-hk",{"path":158,"localeSlug":159,"i18nKey":114},"/zh-tw/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","zh-tw",{"path":161,"localeSlug":162,"i18nKey":114},"/zh-cn/wiki/2023-12-29-git-jiao-xue/ch4-chang-jian-wen-ti","zh-cn",[105,121,152,121,155,121,158,121,161,121],1780671808540]