[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573217-105":53,"doc-detail-573217-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-git-commands-and-workflows","Git Cheat Sheet - Git commands and workflows","","Concise Git reference covering core version control actions and common daily workflows. Includes commands for cloning repositories, checking status and diffs, staging and creating commits, pushing to remotes, and managing branches via checkout, merge, and branch listing. Also summarizes organizing history with log views, reset options, and cached diffs, plus remote collaboration through fetch, pull with rebase, stashing, and safe/force push behaviors.",{"@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-git-commands-and-workflows/573217/",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-git-commands-and-workflows/573217.png","ImageObject",442,249,{"name":88,"@type":89},"Oliver","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-18","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":73},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"What is the difference between git fetch and git pull?","Question",{"text":108,"@type":109},"git fetch downloads changes and references from a remote. git pull fetches and merges changes from a remote repository into the current branch.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"Which commands help you review local changes and history?",{"text":113,"@type":109},"git status shows a summary of local changes and untracked files. git diff displays specific local changes, while git log --graph --oneline shows a readable branch history view.",{"name":115,"@type":106,"acceptedAnswer":116},"How do you sync your local work with a remote repository?",{"text":117,"@type":109},"Use git push origin HEAD to send commits from your current local HEAD to the origin remote. For collaboration, use git fetch --all or git pull --rebase to update from remote branches, and use git stash to save uncommitted 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},573217,1792338100,{"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":73,"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},8796095461610,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Git Cheat Sheet  \nGit is a version control system.  \n\n| The essentials: Using Git |  |  |  |\n| --- | --- | --- | --- |\n| git clone | Clone a Git repository to your local computer |  |  |\n| git fetch | Fetch changes from a remote repository |  |  |\n| git pull | Fetch and merge changes from a remote repository |  |  |\n| git status | See a summary of local changes, remote commits, and untracked files. |  |  |\n| git diff | See specific local changes. Use –-name-only to see filenames. |  |  |\n| git add | Stage changes to tracked and untracked files. |  |  |\n| git commit | Create a new commit with changes previously added. |  |  |\n| git push | Send changes to your configured remote repository (like GitLab or GitHub) . |  |  |\n| Important options: Keeping things organized |  |  |  |\n| git reset HEAD-- |  | Get back to the last known commit and unstage files. |  |\n| git add -u |  | Add only updated, previously committed files. |  |\n| git log –-graph –-oneline |  | See a pretty branch history. Create an alias (git lg) for easy access. |  |\n| Basic branching: Branches represent a series of commits |  |  |  |\n| git branch --all |  |  | List all local and remote branches |\n| git checkout bugfix |  |  | Change to an existing branch called bugfix |\n| git checkout -b dev main |  |  | Make and checkout a branch called dev based on main |\n| git checkout main\u003Cbr>git merge dev |  |  | Merge branch changes from dev into main |\n\n\n| Pushing changes: Sending data from your local repository to a remote repository |  |  |  |  |\n| --- | --- | --- | --- | --- |\n| git | remote -v |  |  | View all configured remotes |\n| git | push | origin | HEAD | Push commits located at the HEAD of your repo to the origin repo |\n| git | push | origin | +HEAD | Push commits, forcing remote to adopt local changes |\n| git | push | origin | –d dev | Delete dev branch from remote after pushing changes |\n\nMatt Broberg & Seth Kenlon CC BY-SA 4.0 [Opensource.com](Opensource.com)  \nGit Cheat Sheet  \n\n| Basic flow: Daily usage of Git, including important options |  |\n| --- | --- |\n| git init demo && cd demo cp ~/Code/mycode .py mycode.pygit add [mycode.py](mycode.py)\u003Cbr>git commit -m 'My first commit'git show | Initialize a local Git repository, creating the directory if it doesn't exist. Change directory to the repo, add files, and commit. |\n| git diff\u003Cbr>git commit --all -m 'Another commit' | As you begin to hack on local files, you commit them at regular intervals. The--all option commits changes to existing files (use git add to add new files) . |\n| git log –-graph --abbrev-commit\u003Cbr>git reset -–soft HEAD~3\u003Cbr>git diff –-cached\u003Cbr>git commit -am 'Message for 3 commits' | After a while, you have 3 commits that are meaningful as a single commit. |\n| git push origin HEAD | Lastly, you push your local changes to a remote repository, designated as origin. |\n| Working with a remote repository: Contributing to public repositories |  |\n| git fetch --all | Download all commits and references |\n| git pull –-rebase \u003Cremote> \u003Cbranch> | Merge all commits since your last common commit from the remote branch without a merge commit |\n| git stash | Save uncommitted changes |\n| git stash pop | Restore saved changes |\n| git add \u003Cfile> | Add a file to the staging area, to be committed |\n| git commit -m 'commit message' | Most projects have a format for commit messages. |\n| git checkout -b \u003Cnew_branch> | Create and checkout a branch |\n| git checkout main && git pull --rebase | Checkout and update the main branch |\n| git reset head –-hard origin/main | WARNING: Erase all local changes |\n| git push -u origin HEAD | Push your changes and the current branch to the origin repository |\n| git push origin HEAD | Push your changes to the origin repository |\n\nMatt Broberg & Seth Kenlon  \nCC BY-SA 4.0  \n[Opensource.com](Opensource.com)","cbCaijU0PJPPhRkj","https://ap.wps.com/l/cbCaijU0PJPPhRkj","pdf",88832,"English","# The essentials: Using Git\n## Important options: Keeping things organized\n# Basic branching: Branches represent a series of commits\n# Pushing changes: Sending data from your local repository to a remote repository\n# Basic flow: Daily usage of Git\n## Working with a remote repository: Contributing to public repositories","[{\"question\":\"What is the difference between git fetch and git pull?\",\"answer\":\"git fetch downloads changes and references from a remote. git pull fetches and merges changes from a remote repository into the current branch.\"},{\"question\":\"Which commands help you review local changes and history?\",\"answer\":\"git status shows a summary of local changes and untracked files. git diff displays specific local changes, while git log --graph --oneline shows a readable branch history view.\"},{\"question\":\"How do you sync your local work with a remote repository?\",\"answer\":\"Use git push origin HEAD to send commits from your current local HEAD to the origin remote. For collaboration, use git fetch --all or git pull --rebase to update from remote branches, and use git stash to save uncommitted changes.\"}]","Git Cheat Sheet - Git commands and workflows | PDF",1791934853]