[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-693049-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-693049-en":130,"doc-similar-693049":230},{"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":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","beejs-guide-to-git-brian-beej-jorgensen-hall-v1210","Beej’s Guide to Git - Brian “Beej Jorgensen” Hall v1.2.10","","Beej’s Guide to Git provides a structured introduction to Git and practical workflows for using repositories locally and with GitHub. It covers core concepts such as cloning, staging, committing, pushing, and the role of HEAD and the git log, then expands into branches, fast-forward merges, and merge conflicts. The guide also explains GitHub usage and collaboration, subdirectories, ignore rules via .gitignore, and remote management including remote tracking branches.",{"@graph":14,"@context":72},[15,34,55],{"@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/beejs-guide-to-git-brian-beej-jorgensen-hall-v1210/693049/",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/beejs-guide-to-git-brian-beej-jorgensen-hall-v1210/693049.png","ImageObject",300,407,{"name":42,"@type":43},"Rowan","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-22","2026-11-09",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What does the guide cover in Git basics?","Question",{"text":62,"@type":63},"It introduces Git concepts and core workflows including cloning, making local changes, staging, committing, and pushing changes to a remote repository.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How does the guide explain HEAD and the git log?",{"text":67,"@type":63},"It describes what’s in the log, the meaning of the HEAD reference, and how HEAD behaves when moving back in time or entering a detached HEAD state.",{"name":69,"@type":60,"acceptedAnswer":70},"What topics are included for branches, merges, and conflicts?",{"text":71,"@type":63},"It covers branch creation and listing, fast-forward merges, merging divergent branches, what merge conflicts look like, why conflicts happen, and options for merging using IDEs or tools.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},693049,1794246586,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,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":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"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":33,"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":79,"read_time":144,"preview_page_count":127,"preview_urls":145},1099514067415,"https://ap-avatar.wpscdn.com/avatar/100002539d78ffe74a7?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779092875211072502","Beej’s Guide to Git  \nBrian “Beej Jorgensen” Hall v1.2.10, Copyright © October 31, 2026  \nContents  \n1 Foreword 1  \n1.1 Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1  \n1.2 Official Homepage ....................................... 2  \n1.3 Email Policy .......................................... 2  \n1.4 Mirroring ............................................ 2  \n1.5 Note for Translators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2  \n1.6 Copyright and Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2  \n1.7 Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3  \n2 Git Basics 4  \n2.1 What is Git? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n2.1. 1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4  \n2.2 What is GitHub? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n2.3 What is GitHub? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n2.4 The Most Basic Git Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5  \n2.4. 1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.5 What is Cloning? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.5. 1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.6 How Do Clones Interact? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6  \n2.7 Actual Git Usage ........................................ 6  \n2.7.1 Step 0: One-time Setup ................................. 7  \n2.7.2 Step 1: Clone an Existing Repo ............................ 7  \n2.7.3 Step 2: Make Some Local Changes .......................... 9  \n2.7.4 Step 3: Add Changes to the Stage ........................... 10  \n2.7.5 Step 4: Commit those Changes ............................ 11  \n2.7.6 Step 5: Push Your Changes to the Remote Repo ................... 12  \n3 GitHub: How To Use It 14  \n3.1 Making a GitHub Account .................................. 14  \n3.2 Creating a New Repo on GitHub ............................... 14  \n3.3 Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  \n3.3. 1 GitHub CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  \n3.3.2 SSH Keys ........................................ 15  \n3.3.3 Using Personal Access Tokens ............................. 17  \n3.4 Make a Local Clone of the Repo ............................... 18  \n3.4.1 Cloning from GitHub with GitHub CLI ........................ 18  \n3.4.2 Cloning from GitHub with SSH Keys ......................... 18  \n3.5 Make Changes and Push! ................................... 19  \n3.6 Collaboration on GitHub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  \n4 The Git Log and  HEAD  20  \n4.1 An Example Log ........................................ 20  \n4.2 What’s in the log? ....................................... 20  \n4.3 The  HEAD  Reference ..................................... 21  \n4.4 Going Back In Time and Detached  HEAD  .......................... 22  \n4.5 The Old Command:  git checkout  ............................. 23  \n4.6 Commits Relative to  HEAD  .................................. 24  \nCONTENTS ii  \n5 Branches and Fast-Forward Merges 26  \n5.1 What is a Branch? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26  \n5.2 A Quick Note about git pull  ............................... 28  \n5.3  HEAD  and Branches ...................................... 28  \n5.4 Listing All Your Branches ................................... 29  \n5.5 Creating a Branch ....................................... 30  \n5.6 Make Some Commits on a Branch . . . . . . . . . . . . . . . . . . .","cbCaij5RNh0P34Vx","https://ap.wps.com/l/cbCaij5RNh0P34Vx","pdf",966493,187,"English","# Foreword\n## Audience\n## Official Homepage\n## Email Policy\n## Mirroring\n## Note for Translators\n## Copyright and Distribution\n## Dedication\n# Git Basics\n## What is Git?\n## What is GitHub?\n## The Most Basic Git Workflow\n## What is Cloning?\n## How Do Clones Interact?\n## Actual Git Usage\n# GitHub: How To Use It\n## Making a GitHub Account\n## Creating a New Repo on GitHub\n## Authentication\n## Make a Local Clone of the Repo\n## Make Changes and Push!\n## Collaboration on GitHub\n# The Git Log and HEAD\n## An Example Log\n## What’s in the log?\n## The HEAD Reference\n## Going Back In Time and Detached HEAD\n## The Old Command: git checkout\n# Branches and Fast-Forward Merges\n## What is a Branch?\n## HEAD and Branches\n## Listing All Your Branches\n## Creating a Branch\n## Merging: Fast-Forward\n# Merging and Conflicts\n## An Example of Divergent Branches\n## Merging Divergent Branches\n## Merge Conflicts\n## What a Conflict Looks Like\n## Why Merge Conflicts Happen\n# Using Subdirectories with Git\n## Repos and Subdirectories\n## What about Subprojects?\n## Accidentally Making a Repo in your Home Directory\n## Empty Subdirectories in Repos\n# Ignoring Files with .gitignore\n## Adding a .gitignore File\n## Wildcards\n## Negated .gitignore Rules\n## How To Ignore All Files Except a Few?\n## Getting Premade .gitignore Files\n# Remotes: Repos in Other Places\n## Remote and Branch Notation\n## Getting a List of Remotes\n## Changing a Remote’s URL\n## Adding a Remote\n# Remote Tracking Branches","[{\"question\":\"What does the guide cover in Git basics?\",\"answer\":\"It introduces Git concepts and core workflows including cloning, making local changes, staging, committing, and pushing changes to a remote repository.\"},{\"question\":\"How does the guide explain HEAD and the git log?\",\"answer\":\"It describes what’s in the log, the meaning of the HEAD reference, and how HEAD behaves when moving back in time or entering a detached HEAD state.\"},{\"question\":\"What topics are included for branches, merges, and conflicts?\",\"answer\":\"It covers branch creation and listing, fast-forward merges, merging divergent branches, what merge conflicts look like, why conflicts happen, and options for merging using IDEs or tools.\"}]","Beej’s Guide to Git - Brian “Beej Jorgensen” Hall v1.2.10 | PDF",471,[146,150,154,158,162,166,170,174,178,182,186,191,196,201,206,211,216,221,226],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/221dfa5d1751509c6c86e382f3d9eed6.webp",983,1390,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c347fc89d722e43923045f4be56ace92.webp",982,1388,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/1642480233e67ed217c4028bcb8f23ab.webp",981,1387,{"page_no":33,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/cb98ee346b3a1cfdfc04f51fe9222ac2.webp",980,1385,{"page_no":96,"url":163,"width":164,"height":165},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/cba24e8835ab5870433c350a03202111.webp",979,1384,{"page_no":101,"url":167,"width":168,"height":169},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/d001b7f38bfdd155d6dcc73b5c1cc2fc.webp",978,1383,{"page_no":105,"url":171,"width":172,"height":173},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/36d73742450b74af902dd2479a64e4ff.webp",977,1381,{"page_no":110,"url":175,"width":176,"height":177},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/0615cbc93ea23c5e21c6488a225c7e16.webp",976,1380,{"page_no":115,"url":179,"width":180,"height":181},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/5f8bcde099be3d6bf56858fa38130833.webp",975,1378,{"page_no":123,"url":183,"width":184,"height":185},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/0916e4730f2c9905e3ae1742a26fea34.webp",974,1377,{"page_no":187,"url":188,"width":189,"height":190},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/3316defbf9f4facf97267644b5558ed7.webp",973,1375,{"page_no":192,"url":193,"width":194,"height":195},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/be61507bb885b8c0e8c488a29bc19cb0.webp",972,1374,{"page_no":197,"url":198,"width":199,"height":200},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/6e6ebc5dfa42932c2d3395fdf7caf2cc.webp",971,1373,{"page_no":202,"url":203,"width":204,"height":205},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/c48457a68139bddf1ed3d2d65efb77a6.webp",970,1371,{"page_no":207,"url":208,"width":209,"height":210},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e406e69f65ed8c2fd74176eb754e6c24.webp",969,1370,{"page_no":212,"url":213,"width":214,"height":215},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/1f24ec3493f5ec90eac0943d01476bf3.webp",968,1368,{"page_no":217,"url":218,"width":219,"height":220},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/a077a3f55ea2bf10bb367b9cf22dda17.webp",967,1367,{"page_no":222,"url":223,"width":224,"height":225},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/606e4714e2599a4b1439ea4aee8ebefc.webp",966,1366,{"page_no":127,"url":227,"width":228,"height":229},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/b1116b2c22a80377457a7167b10da8c0.webp",965,1364,{"list":231,"token":11},[232,238,244,250,256,261,267,273,279,285],{"doc_id":233,"doc_title":234,"file_type":137,"home_preview_img_url":235,"slug":236,"view_count":101,"category_name":29,"create_tm":237},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=1796111099&Signature=TGp%2BZBd6hOr7FzoziFAt7Igt3bM%3D","git-and-github-terms-and-diagrams-presenter-steve-baskauf",1792983193,{"doc_id":239,"doc_title":240,"file_type":137,"home_preview_img_url":241,"slug":242,"view_count":101,"category_name":29,"create_tm":243},682034,"A Practical Guide to Git and GitHub for Windows Users - From Beginner to Expert - Easy Step-By-Step Exercises","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999332552/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=sELsFyXNmMK%2FVPKt3CmoBJ4fRzY%3D","a-practical-guide-to-git-and-github-for-windows-users-from-beginner-to-expert-easy-step-by-step-exercises",1793958635,{"doc_id":245,"doc_title":246,"file_type":137,"home_preview_img_url":247,"slug":248,"view_count":26,"category_name":29,"create_tm":249},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=1796111099&Signature=NiRKau4Urud9wk%2FiqFKL0qz%2FtL4%3D","git-0-to-pro-reference",1795898473,{"doc_id":251,"doc_title":252,"file_type":137,"home_preview_img_url":253,"slug":254,"view_count":101,"category_name":29,"create_tm":255},682036,"Pragmatic Guide to Git - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999332684/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=sku3FbiCvCkm4MJLPrrBeFqsb2U%3D","pragmatic-guide-to-git-read-online-free",1793958640,{"doc_id":257,"doc_title":258,"file_type":137,"home_preview_img_url":259,"slug":260,"view_count":22,"category_name":29,"create_tm":249},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=1796111099&Signature=KAHwdu9CQR9NZLO5ZHBmR6lIkiQ%3D","git-a-practical-beginner-friendly-guide-to-version-control-from-your-first-commit-to-branching-merging-github",{"doc_id":262,"doc_title":263,"file_type":137,"home_preview_img_url":264,"slug":265,"view_count":105,"category_name":29,"create_tm":266},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=1796111099&Signature=g5TZ%2F%2BnID%2F8%2Fz23dg7dJvy6zqWg%3D","git-guide-git-collaboration-and-core-commands",1793958643,{"doc_id":268,"doc_title":269,"file_type":137,"home_preview_img_url":270,"slug":271,"view_count":4,"category_name":29,"create_tm":272},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=1796111099&Signature=S8tdC9AkIgnX43VxbnRGtRVZgzI%3D","version-control-and-collaboration-with-git-git-basics-workflow-and-terminology",1795908758,{"doc_id":274,"doc_title":275,"file_type":137,"home_preview_img_url":276,"slug":277,"view_count":22,"category_name":29,"create_tm":278},760092,"Git Extensions - Release 3.00.00.4433 - Documentation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044226737/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=vApyF0FZNR3atyTdUqa1NmWX5Vc%3D","git-extensions-release-300004433-documentation",1795898477,{"doc_id":280,"doc_title":281,"file_type":137,"home_preview_img_url":282,"slug":283,"view_count":123,"category_name":29,"create_tm":284},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=1796111099&Signature=3Lunt6icfj8X%2FXKX7HWHjlI%2BBoA%3D","beginners-guide-to-using-git",1794246579,{"doc_id":286,"doc_title":287,"file_type":137,"home_preview_img_url":288,"slug":289,"view_count":96,"category_name":29,"create_tm":290},693048,"Project Management with Git - Basics - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005055460/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111099&Signature=ZtkM1E2dKlKjTwfoCU2pvz1KWIk%3D","project-management-with-git-basics-introduction",1794246583]