[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-682042-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-682042-en":130,"doc-similar-682042":191},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","git-and-github-guide-version-control-basics-free-study-notes","Git and GitHub Guide - Version control basics - Free study notes","","Git and GitHub Guide provides practical, beginner-to-intermediate study notes covering why version control matters in DevOps and how Git records project history. It explains repositories, working tree, staging area, and commits, then details Git’s snapshot model, commit identifiers, and parent-hash integrity. The guide compares Git with older and centralized tools, distinguishes good versus poor use cases, and demonstrates safe commands like git log and git diff, while warning against common mistakes.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/git-and-github-guide-version-control-basics-free-study-notes/682042/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/git-and-github-guide-version-control-basics-free-study-notes/682042.png","ImageObject",300,407,{"name":42,"@type":43},"Cipher","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-11-06",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is version control and why does it matter in DevOps?","Question",{"text":63,"@type":64},"Version control records changes to files over time, lets teams see who changed what and why, and supports collaboration. In DevOps, it enables audit trails, safe experiments, rollback, automation triggers via CI/CD, and structured review before production.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does Git store project history?",{"text":68,"@type":64},"Git stores the project as a series of snapshots, where each snapshot is a commit containing the full state of tracked files plus metadata and a pointer to the previous commit. Unchanged files are stored once and shared between snapshots for efficiency.",{"name":70,"@type":61,"acceptedAnswer":71},"Which are common mistakes people make when using Git?",{"text":72,"@type":64},"Common mistakes include treating Git as a backup, committing secrets (which remain in old commits even after deletion), creating giant “misc changes” commits that are hard to review, and confusing Git with GitHub.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},682042,1793958652,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":55,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":145,"preview_urls":146},687208528416,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","devopsshub  \nGit and GitHub Guide  \nFrom ﬁrst commit to pull requests, with recovery recipes.  \n28 lessons · Roadmap stage 2 : Git and GitHub  \nFree study notes by Rishu Raj Singh, DevOps Trainee  \nGenerated 2026-10-20  \ndevopsshub · Git and GitHub Guide  \nPage 1 of 109  \nContents  \nVERSION CONTROL BASICS  \nWhat version control is Beginner  \n\n| Git vs GitHub | Beginner |\n| --- | --- |\n| Repository concepts | Beginner |\n| The working tree | Beginner |\n| The staging area | Beginner |\n| Commits | Beginner |\n| EVERYDAY COMMANDS\u003Cbr>git init | Beginner |\n| git clone | Beginner |\n| git status | Beginner |\n| git add | Beginner |\n| git commit | Beginner |\n| git push | Beginner |\n| git pull | Beginner |\n| BRANCHING AND MERGING\u003Cbr>Branching | Beginner |\n| Merging | Beginner |\n| Merge conﬂicts | Intermediate |\n| Rebase | Intermediate |\n| REMOTES AND COLLABORATION\u003Cbr>Remotes | Beginner |\n| .gitignore | Beginner |\n| Tags | Beginner |\n| Releases | Intermediate |\n| Pull requests | Beginner |\n| Code reviews | Intermediate |\n\ndevopsshub · Git and GitHub Guide  \nPage 2 of 109  \nAuthentication errors  \nBeginner  \n\n| RECOVERY AND TEAM WORKFLOWS |  |\n| --- | --- |\n| Undoing changes safely | Intermediate |\n| Team workﬂows | Intermediate |\n| CHEAT SHEETS AND QUICK REFERENCES\u003Cbr>Git cheat sheet | Beginner |\n\ndevopsshub · Git and GitHub Guide  \nPage 3 of 109  \nVersion control basics  \nWhat version control is and the three places your work lives in Git.  \n\n| What version control is\u003Cbr>Understand what a version control system records, why teams cannot work safely without one, and how Git diﬀers from older tools.\u003Cbr>BEGINNER · CONCEPT |\n| --- |\n| What it is |\n\nVersion control is a system that records changes to a set of ﬁles over time, so you can recall any earlier state, see who changed what and why, and combine the work of several people. The set of ﬁles plus its recorded history is called a repository (often shortened to \"repo\" ) .  \nWithout it, people invent their own versions:  [deploy-final.sh](deploy-final.sh) ,  [deploy-final-v2.sh](deploy-final-v2.sh) ,  deploy-final  \n[REALLY.sh](REALLY.sh) . Version control replaces that habit with one real copy of each ﬁle and a labelled history behind it.  \nThere are two broad designs:  \n Centralised systems keep the history on one server. You check ﬁles out, edit, and check them back in. If the server is down, nobody can see history.  \n Distributed systems, including Git, give every person a full copy of the history. You can commit, browse the log and create branches on a plane with no network. A server (such as GitHub) is just another copy that people agree to treat as the shared one.  \nWhy it matters in DevOps  \nDevOps work is mostly text: application code, Dockerﬁles, Kubernetes manifests, Terraform ﬁles, pipeline deﬁnitions and shell scripts. Putting all of it in version control gives you:  \n An audit trail. When a deployment breaks at 14:05 ,  git log  shows which change landed at 14:00 and who wrote it.  \n Safe experiments. You can try a risky infrastructure change on a branch and throw it away.  \n Rollback. Returning to a known good version is a recorded, reviewable action instead of guesswork.  \n Automation triggers. CI/CD systems start from commits and pull requests; see What is CI/CD.  \n Collaboration with review. Changes are proposed, read and approved before they reach production.  \n\" Infrastructure as code\" is only meaningful if that code lives in version control.  \ndevopsshub · Git and GitHub Guide  \nPage 4 of 109  \nHow it works  \nGit stores your project as a series of snapshots. Each snapshot is a commit: the full state of the tracked ﬁles at one moment, plus a message, an author, a timestamp and a pointer to the previous commit. Git is eﬃcient because unchanged ﬁles are stored once and shared between snapshots.  \n\n| \u003Cbr>Edit ﬁles\u003Cbr>working tree | → | \u003Cbr>Choose changes\u003Cbr>staging area |  |  | \u003Cbr>→\u003Cbr>Commit\u003Cbr>snapshot in history |\n| --- | --- | --- | --- | --- | --- |\n| \u003Cbr>Commit\u003Cbr>local","cbCaivsKbn57WmZg","https://ap.wps.com/l/cbCaivsKbn57WmZg","pdf",1499013,109,"English","# VERSION CONTROL BASICS\n## What version control is\n## How it works\n## What is and is not suited to Git\n## Examples\n### Reading history\n### Comparing two states\n## Common mistakes\n# EVERYDAY COMMANDS\n# BRANCHING AND MERGING\n# REMOTES AND COLLABORATION\n# RECOVERY AND TEAM WORKFLOWS\n# CHEAT SHEETS AND QUICK REFERENCES","[{\"question\":\"What is version control and why does it matter in DevOps?\",\"answer\":\"Version control records changes to files over time, lets teams see who changed what and why, and supports collaboration. In DevOps, it enables audit trails, safe experiments, rollback, automation triggers via CI/CD, and structured review before production.\"},{\"question\":\"How does Git store project history?\",\"answer\":\"Git stores the project as a series of snapshots, where each snapshot is a commit containing the full state of tracked files plus metadata and a pointer to the previous commit. Unchanged files are stored once and shared between snapshots for efficiency.\"},{\"question\":\"Which are common mistakes people make when using Git?\",\"answer\":\"Common mistakes include treating Git as a backup, committing secrets (which remain in old commits even after deletion), creating giant “misc changes” commits that are hard to review, and confusing Git with GitHub.\"}]","Git and GitHub Guide - Version control basics - Free study notes | PDF",275,11,[147,151,155,159,163,167,171,175,179,183,187],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/b4c8443449f017cfd1faa2244aa214d2.webp",983,1390,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/f4b4a533797957fae57e653718bf03da.webp",982,1388,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/3340d95025df9cf70f63b4874d5843f6.webp",981,1387,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/f75b14b03f98b672abcd1ae734ad91fc.webp",980,1385,{"page_no":97,"url":164,"width":165,"height":166},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/0b4e6c8d20a5d29e4cc6e30e1076996e.webp",979,1384,{"page_no":55,"url":168,"width":169,"height":170},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/68bc6becbf9dcbc5d77fc8ac956dad3b.webp",978,1383,{"page_no":105,"url":172,"width":173,"height":174},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/e66ac6ed432edc443a3025d616f87d3c.webp",977,1381,{"page_no":110,"url":176,"width":177,"height":178},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/5ace928d6a3c65861a5ed2e4da201f31.webp",976,1380,{"page_no":115,"url":180,"width":181,"height":182},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/ac39dc8591c4c673246e95634b1e9f7a.webp",975,1378,{"page_no":123,"url":184,"width":185,"height":186},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/5c3188abda9cfeb65fde0f77214b637a.webp",974,1377,{"page_no":145,"url":188,"width":189,"height":190},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/0ced02385208bd1acd7fc6c0677df7b8.webp",973,1376,{"list":192,"token":11},[193,199,205,211,217,223,229,235,241,247],{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":22,"category_name":29,"create_tm":198},760727,"The Modern Git & GitHub Guide - A Beginner-to-Professional Quick Reference - 2026 Edition","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044249572/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=%2FmQZhd3b1u5aOqAftLGlZRRuimc%3D","the-modern-git-github-guide-a-beginner-to-professional-quick-reference-2026-edition",1795908750,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":26,"category_name":29,"create_tm":204},760090,"Git-0 to Pro Reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495433/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=SkogPM%2Bk7rH4voDCfqtvOPhQaP0%3D","git-0-to-pro-reference",1795898473,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":22,"category_name":29,"create_tm":210},760087,"GitFourchette - User's Guide - July 2 2026 version 1.9","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495428/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=bmxuzhqc8lizkH1CVDroyP%2B2z2I%3D","gitfourchette-users-guide-july-2-2026-version-19",1795898466,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":30,"category_name":29,"create_tm":216},693053,"Version Control with Git","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005055485/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=SDROgREPAY07bMVA%2FYxYfaYVa7E%3D","version-control-with-git",1794246596,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":22,"category_name":29,"create_tm":222},760730,"GitHub for Developers Training Manual - v1.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044249605/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Ozjwms70uh3EwT%2B732JwACgjBkA%3D","github-for-developers-training-manual-v10",1795908755,{"doc_id":224,"doc_title":225,"file_type":137,"home_preview_img_url":226,"slug":227,"view_count":105,"category_name":29,"create_tm":228},682038,"Git Guide - Git collaboration and core commands","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999332702/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=OY5bZ4jBvzNEn5BdMS5pdCUWHDw%3D","git-guide-git-collaboration-and-core-commands",1793958643,{"doc_id":230,"doc_title":231,"file_type":137,"home_preview_img_url":232,"slug":233,"view_count":55,"category_name":29,"create_tm":234},657566,"Git and GitHub Terms and Diagrams - Presenter Steve Baskauf","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975111111/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=yoNdvBisbXcBCEJSCd0P2bCcFK0%3D","git-and-github-terms-and-diagrams-presenter-steve-baskauf",1792983193,{"doc_id":236,"doc_title":237,"file_type":137,"home_preview_img_url":238,"slug":239,"view_count":4,"category_name":29,"create_tm":240},760732,"Version-Control-and-collaboration-with-Git - Git basics, workflow, and terminology","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044524234/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=FLy%2BPFChLRaSbPMQmpuQQXFDKMU%3D","version-control-and-collaboration-with-git-git-basics-workflow-and-terminology",1795908758,{"doc_id":242,"doc_title":243,"file_type":137,"home_preview_img_url":244,"slug":245,"view_count":123,"category_name":29,"create_tm":246},693047,"Beginner’s Guide to using Git","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005055448/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=hNaiir35jNtaF2VeGzpq%2BVYgY6c%3D","beginners-guide-to-using-git",1794246579,{"doc_id":248,"doc_title":249,"file_type":137,"home_preview_img_url":250,"slug":251,"view_count":22,"category_name":29,"create_tm":204},760091,"Git - A Practical, Beginner-Friendly Guide to Version Control - From Your First Commit to Branching, Merging & GitHub","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495447/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=vvKNdGuSx6YMRe8cVUJSs224pVU%3D","git-a-practical-beginner-friendly-guide-to-version-control-from-your-first-commit-to-branching-merging-github"]