[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-693047-105":3,"detail-sidebar-cat-0-en-105":85,"doc-detail-693047-en":134,"doc-similar-693047":152},{"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":78,"head_meta":80,"extra_data":82,"updated_unix":84},105,"en","beginners-guide-to-using-git","Beginner’s Guide to using Git","","Beginner’s Guide to using Git explains what Git is and why programmers use it to upload code, manage versions, revert broken changes, and collaborate across teams. It introduces GitHub and GitLab repositories, branches, and the need for configuring a Git username and email. The guide covers installing Git on Linux, Windows, and macOS, using SSH keys, and performing common repository workflows such as cloning, manual initialization, branch switching, and uploading changes with git add, git commit, and git push.",{"@graph":14,"@context":77},[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/beginners-guide-to-using-git/693047/",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/beginners-guide-to-using-git/693047.png","ImageObject",300,407,{"name":42,"@type":43},"Miles","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-30","2026-11-09",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",10,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69,73],{"name":60,"@type":61,"acceptedAnswer":62},"What is Git used for?","Question",{"text":63,"@type":64},"Git helps programmers upload code to online servers, create and track different program versions, revert changes when uploads are broken, and collaborate with other team members.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How do you set up Git before using repositories?",{"text":68,"@type":64},"Configure your Git username and email using git config--global user.name and git config--global user.email so others can identify who made which changes.",{"name":70,"@type":61,"acceptedAnswer":71},"How do you upload code to the correct Git branch?",{"text":72,"@type":64},"Add files with git add *, create a commit with git commit-m \"message\", then push to the target branch using git push origin (branchName).",{"name":74,"@type":61,"acceptedAnswer":75},"What steps are involved in starting a Git repository on your computer?",{"text":76,"@type":64},"You can either clone an existing online repository using git clone with the clone URL, or do a manual setup by creating a README repository, running git init, adding a remote, pulling, and then working locally on the initialized repository.","https://schema.org",{"og:url":32,"og:type":79,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":81,"canonical":32},"index,follow",{"doc_id":83,"site_id":7},693047,1794246579,{"code":4,"msg":86,"data":87},"success",[88,92,96,100,105,109,114,119,124,127,130],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},"Exam",70,"exam",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":102,"show_sort_weight":103,"slug":104},5,"Comic",60,"comic",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":107,"slug":108},6,50,"technology",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},7,"Healthcare",40,"healthcare",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},8,"Research & Report",30,"research-report",{"id":120,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":122,"slug":123},9,"Religion & Spirituality",20,"religion-spirituality",{"id":122,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":122,"slug":126},"World Cup","world-cup",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":55,"slug":129},"Lifestyle","lifestyle",{"id":131,"doc_module":4,"doc_module_name":25,"category_name":132,"show_sort_weight":101,"slug":133},19,"General","general",{"code":4,"msg":86,"data":135},{"doc_id":83,"user_id":136,"nickname":42,"user_avatar":137,"doc_module":4,"category_id":106,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":138,"file_id":139,"file_url":140,"file_type":141,"file_size":142,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":115,"language":143,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":144,"faqs":145,"seo_title":146,"seo_description":12,"update_tm":84,"read_time":122,"preview_page_count":22,"preview_urls":147},13056703019404,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Beginner’s Guide to using Git  \nWritten By: Kyle Swygert  \nVoiland College Tutoring Services  \nWSU CptS 223 and onward  \nWhat is Git?  \nGit is a tool that programmers use to upload their code to servers online so they can write a program from many different computers, create different versions of their programs, revert their changes if they upload broken code, as well as collaborating with other team members and many other reasons.  \nGitHub and GitLab are online servers and websites that are used to store code with Git online.  \nCode is uploaded to a place called a “repository,” or a repo Each repository can have many different “branches” that hold different versions of a program or, in our case, different assignments. A Git repository that you are working on may have many different branches, but you can only have oneof those branches downloaded to your computer at a time.  \nInstalling Git  \nLinux ( Ubuntu)  \n● Install the program from the terminal with the command: Windows  \n● Download the Windows tool here: [https://git-scm.com/downloads](https://git-scm.com/downloads)[ ](https://git-scm.com/downloads)Mac  \n● Download the macOS tool here: [https://git-scm.com/downloads](https://git-scm.com/downloads)  \nSet up before Use  \nBefore we even start to work with the Git repositories online or on your computer, you need to add your Git username and email. Setting this information lets other people know who did what in a certain Git repo and is required to use Git. To do so, enter the commands below with your name and email:  \n● git config--global [user.name](user.name) “First Last”  \n● git config--global [user.email](user.email) [first.last@wsu.edu](first.last@wsu.edu)  \nUsing SSH Keys with Git  \nSSH keys are used with GitLab and GitHub to prove your identity so you don’t have to enter your username and password to the Git server everytime that you upload code to the servers. Using SSH keys is not required to use Git, but they make long term use simpler.  \n● [https://docs.gitlab.com/ee/ssh/](https://docs.gitlab.com/ee/ssh/)  \nStarting Using Git  \nGit requires a few steps to get your code that is online onto your computer, but these steps only need to be completed once per Git repository. After the initial start up, only a few steps are used. There are two ways to initialize a Git repository on your computer: Cloning and Manual Setup.  \nCloning  \n1. Go to your newly created Git repository in the GitLab website.  \n2. Click the “Clone” button on the main page of the repository and copy the [HTTPS clone URL to your clipboard](HTTPS clone URL to your clipboard).  \n3. Open a terminal and cd into the directory that you want to hold your Git repo.  \n4. Enter the command below to clone the entire repo into your directory:  \na. git clone ( paste the URL that was copied before)  \n5. Congratulations, your repo is now on your computer!  \nManual Setup  \n1. Go to either GitLab or GitHub and start a new repository with just a single README.txt  \n2. Create a directory for your Git repository and cd into the new directory.  \na. Linux:  \ni. Open a terminal, cd to the location you want to make afolder, make a folder with mkdir, then cd into the new folder  \nb. Windows:  \ni. Open the Git Bash application, cd to the location you want to make a folder, make a folder with mkdir, then cd into the new folder  \nc. MacOS:  \ni. Open a terminal, cd to the location you want to make afolder, make a folder with mkdir, then cd into the new folder  \n3. Once inside the new directory, enter the command  \na. git init  \ni. This will make the directory that you are in into a Git repository and this is where your files from this Git project will be stored.  \n4. We now need to add the source of the project, so we need to add a remote. Enter the following commands:  \na. git remote add origin ( URL for Git Repository online)  \nb. git pull origin master  \n5. Congratulations, you now have the files from the master branch on your local machine!  \nChanging Branches in Git  \nIn a ","cbCaieKHufBZU6j5","https://ap.wps.com/l/cbCaieKHufBZU6j5","pdf",605684,"English","# What is Git?\n## Git repositories and branches\n# Installing Git\n## Linux, Windows, and macOS installation\n# Set up before Use\n## Git username and email configuration\n# Using SSH Keys with Git\n## Identity verification for Git servers\n# Starting Using Git\n## Cloning\n## Manual Setup\n# Changing Branches in Git\n## List, checkout, and create branches\n# Uploading using Git\n## git add, git commit, and git push","[{\"question\":\"What is Git used for?\",\"answer\":\"Git helps programmers upload code to online servers, create and track different program versions, revert changes when uploads are broken, and collaborate with other team members.\"},{\"question\":\"How do you set up Git before using repositories?\",\"answer\":\"Configure your Git username and email using git config--global user.name and git config--global user.email so others can identify who made which changes.\"},{\"question\":\"How do you upload code to the correct Git branch?\",\"answer\":\"Add files with git add *, create a commit with git commit-m \\\"message\\\", then push to the target branch using git push origin (branchName).\"},{\"question\":\"What steps are involved in starting a Git repository on your computer?\",\"answer\":\"You can either clone an existing online repository using git clone with the clone URL, or do a manual setup by creating a README repository, running git init, adding a remote, pulling, and then working locally on the initialized repository.\"}]","Beginner’s Guide to using Git | PDF",[148],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/5eae09089c115731187158f712fe27f1.webp",983,1272,{"list":153,"token":11},[154,160,166,172,178,184,190,196,202,208],{"doc_id":155,"doc_title":156,"file_type":141,"home_preview_img_url":157,"slug":158,"view_count":110,"category_name":29,"create_tm":159},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":161,"doc_title":162,"file_type":141,"home_preview_img_url":163,"slug":164,"view_count":22,"category_name":29,"create_tm":165},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":167,"doc_title":168,"file_type":141,"home_preview_img_url":169,"slug":170,"view_count":22,"category_name":29,"create_tm":171},760731,"Introduction to Git & GitHub - Course Preparation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044249626/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=HufuwQO4XQ7XQmIWVeMfGWwB0dg%3D","introduction-to-git-github-course-preparation",1795908756,{"doc_id":173,"doc_title":174,"file_type":141,"home_preview_img_url":175,"slug":176,"view_count":101,"category_name":29,"create_tm":177},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=1796111999&Signature=to3UIUmTMhMK9aC%2F%2BkUhf1e7%2Fgk%3D","project-management-with-git-basics-introduction",1794246583,{"doc_id":179,"doc_title":180,"file_type":141,"home_preview_img_url":181,"slug":182,"view_count":22,"category_name":29,"create_tm":183},760093,"Pro Git - Version 2.1.424 - read online free","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230044495470/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=Bjsi%2F7tutj%2BtRsrH6rQcBDDy1vo%3D","pro-git-version-21424-read-online-free",1795898482,{"doc_id":185,"doc_title":186,"file_type":141,"home_preview_img_url":187,"slug":188,"view_count":33,"category_name":29,"create_tm":189},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=1796111999&Signature=d%2BUjMGgm8TU2bKWUWxoCWmjZ2IY%3D","beejs-guide-to-git-brian-beej-jorgensen-hall-v1210",1794246586,{"doc_id":191,"doc_title":192,"file_type":141,"home_preview_img_url":193,"slug":194,"view_count":106,"category_name":29,"create_tm":195},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=1796111999&Signature=UrbbauT%2BNRcxTgmWntG4bYI%2FeYs%3D","a-practical-guide-to-git-and-github-for-windows-users-from-beginner-to-expert-easy-step-by-step-exercises",1793958635,{"doc_id":197,"doc_title":198,"file_type":141,"home_preview_img_url":199,"slug":200,"view_count":30,"category_name":29,"create_tm":201},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":203,"doc_title":204,"file_type":141,"home_preview_img_url":205,"slug":206,"view_count":106,"category_name":29,"create_tm":207},682042,"Git and GitHub Guide - Version control basics - Free study notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999332745/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=pwVbQByXIgWEE12DqkLKAR%2BP5IA%3D","git-and-github-guide-version-control-basics-free-study-notes",1793958652,{"doc_id":209,"doc_title":210,"file_type":141,"home_preview_img_url":211,"slug":212,"view_count":106,"category_name":29,"create_tm":213},693052,"Get into Git! - The Advanced Guide to Git Commands","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230004257923/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=mrAt86kzy1CTG%2BgNqa%2FkdT38w6g%3D","get-into-git-the-advanced-guide-to-git-commands",1794246593]