[{"data":1,"prerenderedAt":262},["ShallowReactive",2],{"content-query-DRpc7yU3ea":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":7,"tags":9,"body":10,"_type":256,"_id":257,"_source":258,"_file":259,"_stem":260,"_extension":261},"/tutorials/git","tutorials",false,"","Working with git and GitHub","git",{"type":11,"children":12,"toc":248},"root",[13,22,36,90,95,99,111,116,135,140,143,149,154,178,183,188,218,223,242],{"type":14,"tag":15,"props":16,"children":18},"element","h3",{"id":17},"cloning",[19],{"type":20,"value":21},"text","Cloning",{"type":14,"tag":23,"props":24,"children":25},"p",{},[26,28,34],{"type":20,"value":27},"Using ",{"type":14,"tag":29,"props":30,"children":32},"code",{"className":31},[],[33],{"type":20,"value":9},{"type":20,"value":35}," for version control, most of our repositories will be hosted on GitHub.\nTo clone an existing repository into your machine, run:",{"type":14,"tag":37,"props":38,"children":42},"pre",{"className":39,"code":40,"language":41,"meta":7,"style":7},"language-bash shiki shiki-themes github-light monokai monokai github-light monokai","git clone https://github.com/\u003Crepo_addres>\n","bash",[43],{"type":14,"tag":29,"props":44,"children":45},{"__ignoreMap":7},[46],{"type":14,"tag":47,"props":48,"children":51},"span",{"class":49,"line":50},"line",1,[52,57,63,68,74,79,85],{"type":14,"tag":47,"props":53,"children":55},{"style":54},"--shiki-default:#6F42C1;--shiki-dark-mode:#A6E22E;--shiki-sky-dark-mode:#A6E22E;--shiki-light-mode:#6F42C1;--shiki-blue-mode:#A6E22E",[56],{"type":20,"value":9},{"type":14,"tag":47,"props":58,"children":60},{"style":59},"--shiki-default:#032F62;--shiki-dark-mode:#E6DB74;--shiki-sky-dark-mode:#E6DB74;--shiki-light-mode:#032F62;--shiki-blue-mode:#E6DB74",[61],{"type":20,"value":62}," clone",{"type":14,"tag":47,"props":64,"children":65},{"style":59},[66],{"type":20,"value":67}," https://github.com/",{"type":14,"tag":47,"props":69,"children":71},{"style":70},"--shiki-default:#D73A49;--shiki-dark-mode:#F92672;--shiki-sky-dark-mode:#F92672;--shiki-light-mode:#D73A49;--shiki-blue-mode:#F92672",[72],{"type":20,"value":73},"\u003C",{"type":14,"tag":47,"props":75,"children":76},{"style":59},[77],{"type":20,"value":78},"repo_addre",{"type":14,"tag":47,"props":80,"children":82},{"style":81},"--shiki-default:#24292E;--shiki-dark-mode:#F8F8F2;--shiki-sky-dark-mode:#F8F8F2;--shiki-light-mode:#24292E;--shiki-blue-mode:#F8F8F2",[83],{"type":20,"value":84},"s",{"type":14,"tag":47,"props":86,"children":87},{"style":70},[88],{"type":20,"value":89},">\n",{"type":14,"tag":23,"props":91,"children":92},{},[93],{"type":20,"value":94},"If the repository is private, you will have to enter your credentials next.",{"type":14,"tag":96,"props":97,"children":98},"hr",{},[],{"type":14,"tag":15,"props":100,"children":102},{"id":101},"updating-your-local-repo-with-pull",[103,105],{"type":20,"value":104},"Updating your local repo with ",{"type":14,"tag":29,"props":106,"children":108},{"className":107},[],[109],{"type":20,"value":110},"pull",{"type":14,"tag":23,"props":112,"children":113},{},[114],{"type":20,"value":115},"To update your code with changes from the remote repository, run:",{"type":14,"tag":37,"props":117,"children":119},{"className":39,"code":118,"language":41,"meta":7,"style":7},"git pull\n",[120],{"type":14,"tag":29,"props":121,"children":122},{"__ignoreMap":7},[123],{"type":14,"tag":47,"props":124,"children":125},{"class":49,"line":50},[126,130],{"type":14,"tag":47,"props":127,"children":128},{"style":54},[129],{"type":20,"value":9},{"type":14,"tag":47,"props":131,"children":132},{"style":59},[133],{"type":20,"value":134}," pull\n",{"type":14,"tag":23,"props":136,"children":137},{},[138],{"type":20,"value":139},"This will pull the changes from remote to your local codebase.",{"type":14,"tag":96,"props":141,"children":142},{},[],{"type":14,"tag":15,"props":144,"children":146},{"id":145},"commiting-and-pushing-changes",[147],{"type":20,"value":148},"Commiting and pushing changes",{"type":14,"tag":23,"props":150,"children":151},{},[152],{"type":20,"value":153},"Once you have changes to push to the remote server, you must add the files with:",{"type":14,"tag":37,"props":155,"children":157},{"className":39,"code":156,"language":41,"meta":7,"style":7},"git add my_file.py\n",[158],{"type":14,"tag":29,"props":159,"children":160},{"__ignoreMap":7},[161],{"type":14,"tag":47,"props":162,"children":163},{"class":49,"line":50},[164,168,173],{"type":14,"tag":47,"props":165,"children":166},{"style":54},[167],{"type":20,"value":9},{"type":14,"tag":47,"props":169,"children":170},{"style":59},[171],{"type":20,"value":172}," add",{"type":14,"tag":47,"props":174,"children":175},{"style":59},[176],{"type":20,"value":177}," my_file.py\n",{"type":14,"tag":23,"props":179,"children":180},{},[181],{"type":20,"value":182},"Note that you can add multiple files this way.",{"type":14,"tag":23,"props":184,"children":185},{},[186],{"type":20,"value":187},"Then, you have to commit your changes and include a message (make it descriptive):",{"type":14,"tag":37,"props":189,"children":191},{"className":39,"code":190,"language":41,"meta":7,"style":7},"git commit -m \"Fix invalid index bugs on lines 10-14\"\n",[192],{"type":14,"tag":29,"props":193,"children":194},{"__ignoreMap":7},[195],{"type":14,"tag":47,"props":196,"children":197},{"class":49,"line":50},[198,202,207,213],{"type":14,"tag":47,"props":199,"children":200},{"style":54},[201],{"type":20,"value":9},{"type":14,"tag":47,"props":203,"children":204},{"style":59},[205],{"type":20,"value":206}," commit",{"type":14,"tag":47,"props":208,"children":210},{"style":209},"--shiki-default:#005CC5;--shiki-dark-mode:#AE81FF;--shiki-sky-dark-mode:#AE81FF;--shiki-light-mode:#005CC5;--shiki-blue-mode:#AE81FF",[211],{"type":20,"value":212}," -m",{"type":14,"tag":47,"props":214,"children":215},{"style":59},[216],{"type":20,"value":217}," \"Fix invalid index bugs on lines 10-14\"\n",{"type":14,"tag":23,"props":219,"children":220},{},[221],{"type":20,"value":222},"Finally, push your changes to the remote repo:",{"type":14,"tag":37,"props":224,"children":226},{"className":39,"code":225,"language":41,"meta":7,"style":7},"git push\n",[227],{"type":14,"tag":29,"props":228,"children":229},{"__ignoreMap":7},[230],{"type":14,"tag":47,"props":231,"children":232},{"class":49,"line":50},[233,237],{"type":14,"tag":47,"props":234,"children":235},{"style":54},[236],{"type":20,"value":9},{"type":14,"tag":47,"props":238,"children":239},{"style":59},[240],{"type":20,"value":241}," push\n",{"type":14,"tag":243,"props":244,"children":245},"style",{},[246],{"type":20,"value":247},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}html.dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}html .sky-dark-mode .shiki span {color: var(--shiki-sky-dark-mode);background: var(--shiki-sky-dark-mode-bg);font-style: var(--shiki-sky-dark-mode-font-style);font-weight: var(--shiki-sky-dark-mode-font-weight);text-decoration: var(--shiki-sky-dark-mode-text-decoration);}html.sky-dark-mode .shiki span {color: var(--shiki-sky-dark-mode);background: var(--shiki-sky-dark-mode-bg);font-style: var(--shiki-sky-dark-mode-font-style);font-weight: var(--shiki-sky-dark-mode-font-weight);text-decoration: var(--shiki-sky-dark-mode-text-decoration);}html .light-mode .shiki span {color: var(--shiki-light-mode);background: var(--shiki-light-mode-bg);font-style: var(--shiki-light-mode-font-style);font-weight: var(--shiki-light-mode-font-weight);text-decoration: var(--shiki-light-mode-text-decoration);}html.light-mode .shiki span {color: var(--shiki-light-mode);background: var(--shiki-light-mode-bg);font-style: var(--shiki-light-mode-font-style);font-weight: var(--shiki-light-mode-font-weight);text-decoration: var(--shiki-light-mode-text-decoration);}html .blue-mode .shiki span {color: var(--shiki-blue-mode);background: var(--shiki-blue-mode-bg);font-style: var(--shiki-blue-mode-font-style);font-weight: var(--shiki-blue-mode-font-weight);text-decoration: var(--shiki-blue-mode-text-decoration);}html.blue-mode .shiki span {color: var(--shiki-blue-mode);background: var(--shiki-blue-mode-bg);font-style: var(--shiki-blue-mode-font-style);font-weight: var(--shiki-blue-mode-font-weight);text-decoration: var(--shiki-blue-mode-text-decoration);}",{"title":7,"searchDepth":249,"depth":249,"links":250},2,[251,253,255],{"id":17,"depth":252,"text":21},3,{"id":101,"depth":252,"text":254},"Updating your local repo with pull",{"id":145,"depth":252,"text":148},"markdown","content:tutorials:git.md","content","tutorials/git.md","tutorials/git","md",1793934184829]