[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573218-105":53,"doc-detail-573218-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","git-cheat-sheet-quick-reference-git-basics-branches-workflow-and-deployment","Git Cheat Sheet - Quick reference - Git basics, branches, workflow, and deployment","","Git Cheat Sheet provides a practical, command-focused overview of Git usage, from initial configuration of user name and email to core daily workflows. It covers branch creation and switching, merging feature branches, stashing and applying changes, staging and snapshotting commits, and viewing history with log and diff commands. It also explains sharing and updating via remotes, fetch/merge/push operations, and includes setup commands like init, clone, pull, and help. It closes with contribution steps on GitHub and deploying to Heroku using the Heroku CLI.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/git-cheat-sheet-quick-reference-git-basics-branches-workflow-and-deployment/573218/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/git-cheat-sheet-quick-reference-git-basics-branches-workflow-and-deployment/573218.png","ImageObject",442,249,{"name":88,"@type":89},"Ezra","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-18","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":79},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"How should you set up Git user identity before making your first commit?","Question",{"text":108,"@type":109},"Run git config --global user.name \"My Name\" and git config --global user.email \"[user@email.com]\" so your commits record the correct identity.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"What commands are used to create, switch, and merge branches?",{"text":113,"@type":109},"Use git branch [branch-name] to create, git checkout [branch] or git checkout -b [branch] to switch/create-and-switch, and git merge [branch] to merge into the currently active branch.",{"name":115,"@type":106,"acceptedAnswer":116},"How do you temporarily save uncommitted changes and bring them back later?",{"text":117,"@type":109},"Use git stash to stash currently uncommitted modifications, then use git stash apply to re-apply the last stashed changes.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},573218,1792237840,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":79,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":135,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":136,"faqs":137,"seo_title":138,"seo_description":61,"update_tm":139,"read_time":9},1099514068035,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Git Cheat Sheet  \n\n| Overview\u003Cbr>When you first setup Git, set up your user name and email address so your first commits record them properly.\u003Cbr>git config --global [user.name](user.name) \"My Name\"\u003Cbr>git config --global [user.email](user.email) \"[user@email.com](user@email.com) \"\u003Cbr>About Git, GitHub and Heroku.\u003Cbr>Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. GitHub is the best way to collaborate around your code. Fork, send pull requestsand manage all your public and private git repositories.\u003Cbr>Heroku is a cloud application platform that supports a number of different programming languages including Java, Ruby, Node.js, and Clojure-it's a new way of building and deploying web apps. |  |  | Branch & Merge\u003Cbr>Working with Git branches and the stash. |  |\n| --- | --- | --- | --- | --- |\n|  |  |  | git branch | list your branches. a * will appear next to the currently active branch |\n|  |  |  | git branch [branch-name] | create a new branch at the current commit |\n|  |  |  | git checkout [branch] | switch to another branch and check it out into your working directory |\n|  |  |  | git checkout -b [branch] | create a branch and immediately switch to it |\n|  |  |  | git merge [branch] | merge another branch into your currently active one and record the merge as a commit |\n| Basic Git Workflow Example\u003Cbr>Initialize a new git repository, then stage all the files in the directory and finally commit the initial snapshot.\u003Cbr>$ git init\u003Cbr>$ git add .\u003Cbr>$ git commit -m 'initial commit'\u003Cbr>Create a new branch named featureA, then check it out so it is the active branch. then edit and stage some files and finally commit the new snapshot.$ git branch featureA\u003Cbr>$ git checkout featureA\u003Cbr>$ (edit files)\u003Cbr>$ git add (files)\u003Cbr>$ git commit -m 'add feature A'\u003Cbr>Switch back to the master branch, reverting the featureA changes you just made, then edit some files and commit your new changes directly in the master branch context.\u003Cbr>$ git checkout master\u003Cbr>$ (edit files)\u003Cbr>$ git commit -a -m 'change files'\u003Cbr>Merge the featureA changes into the master branch context, combining all your work. Finally delete the featureA branch.\u003Cbr>$ git merge featureA\u003Cbr>$ git branch -d featureA |  |  |  |  |\n|  |  |  | git log | show commit logs |\n|  |  |  | git stash | stash away the currently uncommitted modifications in your working directory temporarily |\n|  |  |  | git stash apply | re-apply the last stashed changes |\n|  |  |  | Share & Update\u003Cbr>Fetching, merging and working with updates from another repository. |  |\n|  |  |  | git remote add [alias] [url] | add a git URL as an alias |\n|  |  |  | git fetch [alias] | fetch down all the branches from that Git remote |\n|  |  |  | git merge [alias]/[branch] | merge a branch on the server into your currently active branch to bring it up to date |\n|  |  |  | git push [alias] [branch] | push the work on your branch to update that branch on the remote git repository |\n| Setup & Init\u003Cbr>Git configuration, and repository initialization & cloning. |  |  |  |  |\n|  |  |  | git pull | fetch from the URL tracked by the current branch and immediately try to merge in the tracked branch |\n| git config [key] [value] |  | set a config value in this repository |  |  |\n| git config --global [key] [value] |  | set a config value globally for this user | Inspect & Compare\u003Cbr>Examining logs, diffs and object information. |  |\n| git init |  | initialize an existing directory as a Git repository |  |  |\n| git clone [url] |  | clone a Git repository from a URL |  |  |\n|  |  |  | git log | show the commit history for the currently active branch |\n| git help [command] |  | get help on any Git command |  |  |\n| Stage & Snapshot\u003Cbr>Working with snapshots and the Git staging area. |  |  |  |  |\n|  |  |  | git log branchB . .branchA | show the commits on branchA that are not on branchB |\n| git status | show the status of wha","cbCaiqHdOB8RBH5d","https://ap.wps.com/l/cbCaiqHdOB8RBH5d","pdf",340731,"English","# Overview\n# Branch & Merge\n# Basic Git Workflow Example\n# Inspect & Compare\n# Setup & Init\n# Stage & Snapshot\n# Share & Update\n# Contributing on GitHub\n# Deploying to Heroku with Git","[{\"question\":\"How should you set up Git user identity before making your first commit?\",\"answer\":\"Run git config --global user.name \\\"My Name\\\" and git config --global user.email \\\"[user@email.com]\\\" so your commits record the correct identity.\"},{\"question\":\"What commands are used to create, switch, and merge branches?\",\"answer\":\"Use git branch [branch-name] to create, git checkout [branch] or git checkout -b [branch] to switch/create-and-switch, and git merge [branch] to merge into the currently active branch.\"},{\"question\":\"How do you temporarily save uncommitted changes and bring them back later?\",\"answer\":\"Use git stash to stash currently uncommitted modifications, then use git stash apply to re-apply the last stashed changes.\"}]","Git Cheat Sheet - Quick reference - Git basics, branches, workflow, and deployment | PDF",1791934854]