[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-682038-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-682038-en":130,"doc-similar-682038":161},{"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-guide-git-collaboration-and-core-commands","Git Guide - Git collaboration and core commands","","Git Guide explains how Git supports collaborative software development and how teams can work consistently using key concepts and command-line workflows. It defines foundational terms such as repository, commit, branch, and main branch. The guide covers getting started with creating repositories on GitHub, cloning, fetching remote changes, checking out branches and commits, and publishing existing codebases. It also describes core operations (add, commit, push) plus collaboration practices including branches, merging, rebasing, pull requests, and a suggested daily workflow to minimize conflicts.",{"@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-guide-git-collaboration-and-core-commands/682038/",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-guide-git-collaboration-and-core-commands/682038.png","ImageObject",300,407,{"name":42,"@type":43},"Chumphorn","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-29","2026-11-06",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What are the key Git concepts covered in the guide?","Question",{"text":63,"@type":64},"The guide defines repository, commit, branch, and main branch, explaining how they relate to version-controlled collaboration.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the guide suggest getting started with GitHub?",{"text":68,"@type":64},"It instructs users to create a GitHub account, create a new repository, then clone it locally using git clone for local development.",{"name":70,"@type":61,"acceptedAnswer":71},"What collaboration workflow does the guide recommend to reduce conflicts?",{"text":72,"@type":64},"It recommends fetching the latest changes, checking out the main branch commit, creating a feature branch, committing changes, then fetching again and rebasing onto the latest main before merging via a pull request.","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},682038,1793958643,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,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":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"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":102,"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":55,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":80,"read_time":143,"preview_page_count":33,"preview_urls":144},2336475401981,"https://ap-avatar.wpscdn.com/avatar/22000c94efd8d5204d?x-image-process=image/resize,m_fixed,w_180,h_180&k=1786935347598174694","Git Guide  \nGrant Holtes  \nAugust 30, 2024  \n1 Introduction  \nGit is a tool for collaborative software development. This guide helps a technical user understand its key features and help teams work with git in a consistent manner. The commands stated in this document are usually run on the command line, but any good git user interface will provide these actions 1 .  \n2 Getting Started  \n2.1 Some definitions  \nGit is filled with a range of jargon. While most is introduces as needed, the below definitions are foundational.  \n• Repository (Repo) : A repository is a storage location for a project’s files and history, allowing multiple collaborators to manage and track changes in a version-controlled environment.  \n• Commit: A commit is a snapshot of changes made to the project files, saved to the repository with a unique identifier and message describing the update.  \n• Branch: A branch is a sequence of commits that represents an independent line of development within a repository, allowing for changes to be made and tracked separately from the  \nmain line of commits.  \n• Main Branch: The main branch is the primary branch in a repository, containing the most stable and production-ready version of the project’s code.  \n2.2 Account Creation  \nTo get started with Git using GitHub as the remote repository provider, sign up at [https://github.com](https://github.com)[ ](https://github.com)[by clicking](by clicking) ”[Sign Up](Sign Up)”.  \n2.3 Creating a Repository  \nCreate a new repository by clicking the ”+” icon on GitHub and selecting ”New repository”. If you are working on an established repo, you can skip this.  \n1 See git GUI section  \n2.4 Cloning: Downloading a Repository  \nTo work on a project locally, clone the repository using git clone \u003Crepository url> .  \n2.5 Fetching: Checking for changes by others  \nThe fetch command will check for changes by others in the online repository and make those visible in your local copy of the repository.  \n2.6 Checking out: Switching to another version of the codebase  \nThe checkout command will let you view and edit another version of the code by switching to the branch and commit that you select. Make sure you have saved your changes by committing them before you do this!  \n3 Fundamental Git Operations  \n3.1 Adding Files  \nOnce you have edited your files, you need to ’add’ them to the repository. Add files to the repository directory and stage them with git add. You can add files as many times as you like as you edit, with each add overwriting the previous one.  \n3.2 Committing Changes  \nOnce you are happy with your code and you want to preserve a snapshot of the current stage and/or upload your changes, you want to create a commit. Commit changes with git commit-m\"message\".  \n3.3 Pushing Changes  \nShare changes with a push: git push origin YOUR BRANCH NAME. This ensures that others can see your commit in the shared repository.  \n4 Publishing an existing codebase  \nIf you have existing code you want to publish to github, you can follow the above steps to create a new repository, but rather than cloning the empty repository, you can follow the steps below to push your existing code to the new remote repository.  \n1. Create the (hidden) files that git needs using git init. This command needs to be run in the command line / terminal in the root folder of the codebase you wish to publish.  \n2. Add and commit your code with git add . and git commit-m \"Init repo\". These steps could also be done with a git GUI.  \n3. Create a new (empty) repository in github  \n4. Set the URL of the remote repository that you have created by running the following in the command line: git remote add origin \u003Cremote repository URL>  \n5. Push your changes to the remote  \n5 Collaboration with Git  \n5.1 Branches  \nA branch is set of changes (commits) on top of a given set of past changes. Create branches for new features or fixes using git checkout-b \u003Cbranch name> .  \n5.2 Merging  \nMerge branches with git merge \u003Cbranch na","cbCaidbCoAcLPK7U","https://ap.wps.com/l/cbCaidbCoAcLPK7U","pdf",192789,"English","# Introduction\n# Getting Started\n## Some definitions\n## Account Creation\n## Creating a Repository\n## Cloning: Downloading a Repository\n## Fetching: Checking for changes by others\n## Checking out: Switching to another version of the codebase\n# Fundamental Git Operations\n## Adding Files\n## Committing Changes\n## Pushing Changes\n# Publishing an existing codebase\n# Collaboration with Git\n## Branches\n## Merging\n## Rebasing to Avoid Conflicts\n## Pull Requests\n# Suggested collaboration workflow","[{\"question\":\"What are the key Git concepts covered in the guide?\",\"answer\":\"The guide defines repository, commit, branch, and main branch, explaining how they relate to version-controlled collaboration.\"},{\"question\":\"How does the guide suggest getting started with GitHub?\",\"answer\":\"It instructs users to create a GitHub account, create a new repository, then clone it locally using git clone for local development.\"},{\"question\":\"What collaboration workflow does the guide recommend to reduce conflicts?\",\"answer\":\"It recommends fetching the latest changes, checking out the main branch commit, creating a feature branch, committing changes, then fetching again and rebasing onto the latest main before merging via a pull request.\"}]","Git Guide - Git collaboration and core commands | PDF",18,[145,149,153,157],{"page_no":22,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/6a88c3e4811a3ebf8fc659df2cf634b1.webp",983,1272,{"page_no":26,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/05ec169a36863f12a687acb289b0e528.webp",982,1270,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/d2cf3fdd1653d1564c72c849a6247276.webp",981,1269,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/288479d7b8cc6cb9186e8977921dc3d5.webp",980,1268,{"list":162,"token":11},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":123,"category_name":29,"create_tm":168},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=1796110919&Signature=WU9xH69uCApBZe3bcRM46iFIBf4%3D","beginners-guide-to-using-git",1794246579,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":97,"category_name":29,"create_tm":174},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=1796110919&Signature=5wy8siL8dMhNtg%2FUkRUESMo3OLY%3D","project-management-with-git-basics-introduction",1794246583,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":26,"category_name":29,"create_tm":180},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=1796110919&Signature=BwvJWlw6%2BU8YvDNAcUUCHd%2FD0TQ%3D","git-0-to-pro-reference",1795898473,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":22,"category_name":29,"create_tm":186},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=1796110919&Signature=OfO8w4ItkvngzxbMn5nFdOnvtHo%3D","gitfourchette-users-guide-july-2-2026-version-19",1795898466,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":22,"category_name":29,"create_tm":192},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=1796110919&Signature=wIh5iubcnVFR40grjrVbJ8QGPdQ%3D","the-modern-git-github-guide-a-beginner-to-professional-quick-reference-2026-edition",1795908750,{"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},760089,"CS6 Practical System Skills - Fall 2019 - More on Git and Rebasing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495432/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110919&Signature=20sp3Y7ZPEq88EYnAvQrBoG8Dvk%3D","cs6-practical-system-skills-fall-2019-more-on-git-and-rebasing",1795898470,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":102,"category_name":29,"create_tm":204},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=1796110919&Signature=tlXkpa87qBt7hRDbVcPXErxFCSo%3D","git-and-github-terms-and-diagrams-presenter-steve-baskauf",1792983193,{"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},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=1796110919&Signature=jIaJEhxL68WY2gntlosgra7bE2Y%3D","github-for-developers-training-manual-v10",1795908755,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":33,"category_name":29,"create_tm":216},693049,"Beej’s Guide to Git - Brian “Beej Jorgensen” Hall v1.2.10","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230005055466/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110919&Signature=w%2F6zYV%2FOa2Xfwbi3tfxAg%2BHrzWo%3D","beejs-guide-to-git-brian-beej-jorgensen-hall-v1210",1794246586,{"doc_id":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":33,"category_name":29,"create_tm":222},686585,"The Git version control system - An introduction to the Git version control system - Felix Gruber","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001039806/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110919&Signature=15Hce2II8AQJyYLwG9Vu9ewG8xU%3D","the-git-version-control-system-an-introduction-to-the-git-version-control-system-felix-gruber",1794057221]