[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-571427-105":53,"doc-detail-571427-en":127},{"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":120,"head_meta":122,"extra_data":124,"updated_unix":126},105,"en","git-cheat-sheet-commands-and-workflows","Git Cheat Sheet - Commands and Workflows","","Git Cheat Sheet compiles practical command-line instructions for configuring Git, getting help, creating and exploring repositories, and managing commits. It covers viewing repository history, using aliases, and working with tags. The sheet also explains common workflows for local and remote repositories, resolving merge conflicts, navigating time with checkouts, branching and stashing, and examining differences or discarding changes by resetting and un-staging.",{"@graph":63,"@context":119},[64,80,102],{"@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-commands-and-workflows/571427/",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-commands-and-workflows/571427.png","ImageObject",442,249,{"name":88,"@type":89},"Angel","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-22","2026-10-13",true,{"@type":98,"interactionType":99,"userInteractionCount":101},"InteractionCounter",{"@type":100},"ViewAction",8,{"@type":103,"mainEntity":104},"FAQPage",[105,111,115],{"name":106,"@type":107,"acceptedAnswer":108},"How do I set my global Git user name and email?","Question",{"text":109,"@type":110},"Use `git config--global user.name \"Katia Oleinik\"` and `git config--global user.email \"[koleinik@bu.edu]\"`.","Answer",{"name":112,"@type":107,"acceptedAnswer":113},"What commands help me explore the current repository and view commit history?",{"text":114,"@type":110},"Check state with `git status`, view logs with `git log`, `git log--3`, `git log--graph`, `git log--oneline`, and list repository contents like `tree .git` or `git ls-tree master .`.",{"name":116,"@type":107,"acceptedAnswer":117},"How are merge conflicts resolved during collaborative work?",{"text":118,"@type":110},"After a failed push, run `git pull origin master`, then edit the merge commit message if prompted (or edit a file, add, and commit). Finally, push again with `git push origin master`.","https://schema.org",{"og:url":78,"og:type":121,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":123,"canonical":78},"index,follow",{"doc_id":125,"site_id":56},571427,1792014850,{"code":4,"msg":5,"data":128},{"doc_id":125,"user_id":129,"nickname":88,"user_avatar":130,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":131,"file_id":132,"file_url":133,"file_type":134,"file_size":135,"view_count":101,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":73,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":9},687207412472,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","Git Cheat Sheet  \nGit Con􀀌guration  \ncommand  \ngit config--global [user.name](user.name) \"Katia Oleinik\"  \ngit config--global [user.email](user.email) \"[koleinik@bu.edu](koleinik@bu.edu) \"  \ngit config--global cor .editor \"nano\"  \ngit config--list [--global / --local] git config--list--show-origin  \ndescription  \nlist current settings  \ndisplay path to con􀀌g 􀀌les  \nGetting help  \ncommand git help verb man git-verb git verb -h  \ndescription  \nfull manpage for verb  \nfull manpage for verb concise help for verb  \nCreating Local Repository  \ncommand description  \ngit init dirname create a new empty repository  \ngit init a new git repo in an existing folder  \ngit clone /project/scv/dirname clone local repository  \ngit clone [https://github.com/bu-rcs/newpkg.git](https://github.com/bu-rcs/newpkg.git) clone remote repository  \nExploring git repository  \ncommand tree .git  \ngit ls-tree master .  \ngit status  \ngit status-sb  \ngit log  \ngit log--3  \ngit log--graph  \ngit log--oneline  \ngit log- -file1  \ngit log--author=\"Katia Oleinik\"  \ngit log--after=\"2019-1-30\"  \ngit log--grep=\"fix\"  \ngit config--global alias.lg \"log--oneline\"git show ae12375  \ndescription  \nlist content of .git directory list content of a git tree object  \ncheck status of your repository show status concisely  \nshow commit log  \nshow last 3 commits  \ndraw branch graph on the left compact log  \nlist commits with speci􀀌c 􀀌le modi􀀌ed  \n􀀌lter by author  \n􀀌lter by date  \nsearch commit messages create an alias  \nshow info about speci􀀌c commit  \nGit Commit Work􀀍ow  \ncommand  \ngit add file1 file2  \ngit add .  \ngit add-A  \ngit commit-m \"Initial commit\"git commit  \ngit tag-a v2 .15 ae12375  \ndescription  \nadd 􀀌les to staging area  \nadd all changes in directory (no deleted 􀀌les) add all new, modi􀀌ed and delete 􀀌les to staging area  \ncreate commit with short message create a commit (editor will open)  \nAdd a tag to a speci􀀌c commit  \nView 􀀌le source in a commit  \ncommand  \ngit show HEAD:filename  \ngit show 0721696:filename  \ngit annotate filename  \ndescription  \nview source of the 􀀌le in the last commit view source in a speci􀀌c commit  \nshow who made changes to the 􀀌le  \nTravelling in time  \ncommand  \ngit checkout 0721696  \ngit checkout master  \ndescription  \nchange state to a speci􀀌c commit go back to the present time  \nRemote repository work􀀍ow  \ncommand  \ngit remote add origin url git push origin master  \ngit pull origin master  \ndescription  \nconnect local and remote repositories push changes to remote repository  \npull changes to remote repository  \nResolving con􀀍icts  \n1. Make commit  \n2. git push origin master ( results in error)  \n3. git pull origin master  \n4. If editor is opened edit merge commit message. Otherwise edit a 􀀌le, add and commit it  \n5. git push origin master  \nBranches  \ncommand git branch  \ngit branch--list  \ngit branch-a  \ngit branch-v  \ngit branch branchName  \ngit branch-d branchName  \ngit branch-D branchName  \ndescription  \nlist all existing branches  \nlist all branch names  \nlist remote and local branches verbose output  \ncreate a new branch  \ndelete branch (only if it's merged) delete branch (even if not merged)  \ngit checkout branchName create a new branch  \ngit checkout-b branchName create and checkout a new branch  \ngit merge branchName merge branchName into current branch  \nStash  \ncommand description  \ngit stash Temporary store modi􀀌ed tracked 􀀌les  \ngit stash pop restores stashed 􀀌les  \ngit stash list list all stashed changes git stash drop discard most recent shash changes  \nExploring di􀀋erences/changes  \nDiscard changes  \nremove 􀀌le from staging area  \ngit reset HEAD- - /path/to/file  \nunstage all 􀀌les git reset","cbCaic8UExMqTXsC","https://ap.wps.com/l/cbCaic8UExMqTXsC","pdf",73854,"English","# Git configuration\n## Getting help\n# Creating and exploring repositories\n## Local repository setup\n## Repository exploration and history\n# Commit workflow and tags\n## Staging and committing\n## Viewing file changes in commits\n# Navigating history and remote workflows\n## Travelling in time\n## Remote repository work\n# Branches, stash, and conflict resolution\n## Resolving conflicts\n## Branch management\n## Stash and differences","[{\"question\":\"How do I set my global Git user name and email?\",\"answer\":\"Use `git config--global user.name \\\"Katia Oleinik\\\"` and `git config--global user.email \\\"[koleinik@bu.edu]\\\"`.\"},{\"question\":\"What commands help me explore the current repository and view commit history?\",\"answer\":\"Check state with `git status`, view logs with `git log`, `git log--3`, `git log--graph`, `git log--oneline`, and list repository contents like `tree .git` or `git ls-tree master .`.\"},{\"question\":\"How are merge conflicts resolved during collaborative work?\",\"answer\":\"After a failed push, run `git pull origin master`, then edit the merge commit message if prompted (or edit a file, add, and commit). Finally, push again with `git push origin master`.\"}]","Git Cheat Sheet - Commands and Workflows | PDF",1791916937]