/*! For license information please see deeb9650.3c55ad92.js.LICENSE.txt */
"use strict";(self.webpackChunkweb_totals=self.webpackChunkweb_totals||[]).push([[6809],{73397:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var r=o(85893),n=o(11151);const i={sidebar_position:1,title:"How to git work?",comment:!0,tags:["Git"],last_update:{date:"03/03/2023",author:"hunghg255"}},a=void 0,s={id:"git/how-to-git-works",title:"How to git work?",description:"Working directory: where we edit files",source:"@site/docs/git/how-to-git-works.md",sourceDirName:"git",slug:"/git/how-to-git-works",permalink:"/docs/git/how-to-git-works",draft:!1,unlisted:!1,editUrl:"https://github.com/hunghg255/web-totals/tree/main/docs/git/how-to-git-works.md",tags:[{label:"Git",permalink:"/docs/tags/git"}],version:"current",lastUpdatedBy:"hunghg255",lastUpdatedAt:1677776400,formattedLastUpdatedAt:"Mar 2, 2023",sidebarPosition:1,frontMatter:{sidebar_position:1,title:"How to git work?",comment:!0,tags:["Git"],last_update:{date:"03/03/2023",author:"hunghg255"}},sidebar:"tutorialSidebar",previous:{title:"Documentation",permalink:"/docs/intro"},next:{title:"JS Extension - Import/Export Module",permalink:"/docs/javascript/js-extension-import-export-module"}},c={},p=[];function l(t){const e={admonition:"admonition",mermaid:"mermaid",p:"p",...(0,n.a)(),...t.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.mermaid,{value:"sequenceDiagram\n    box Local\n    participant Working Directory\n    participant Staging Area\n    participant Local Repo\n    end\n    box Remote\n    participant Remote Repo\n    end\n    Working Directory->>Staging Area: git add\n    Staging Area->>Local Repo: git commit\n    Local Repo->>Remote Repo: git push\n    Remote Repo->>Local Repo: git fetch\n    Local Repo->>Working Directory: git merge\n    Remote Repo->>Working Directory: git pull\n    Remote Repo->>Local Repo: git clone\n    Local Repo->>Working Directory: git checkout"}),"\n",(0,r.jsxs)(e.admonition,{type:"info",children:[(0,r.jsx)(e.p,{children:"Working directory: where we edit files"}),(0,r.jsx)(e.p,{children:"Staging area: a temporary location where files are kept for the next commit"}),(0,r.jsx)(e.p,{children:"Local repository: contains the code that has been committed"}),(0,r.jsx)(e.p,{children:"Remote repository: the remote server that stores the code (github, gitlab, bitbucket)"})]})]})}function d(t={}){const{wrapper:e}={...(0,n.a)(),...t.components};return e?(0,r.jsx)(e,{...t,children:(0,r.jsx)(l,{...t})}):l(t)}},75251:(t,e,o)=>{var r=o(67294),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function p(t,e,o){var r,i={},p=null,l=null;for(r in void 0!==o&&(p=""+o),void 0!==e.key&&(p=""+e.key),void 0!==e.ref&&(l=e.ref),e)a.call(e,r)&&!c.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===i[r]&&(i[r]=e[r]);return{$$typeof:n,type:t,key:p,ref:l,props:i,_owner:s.current}}e.Fragment=i,e.jsx=p,e.jsxs=p},85893:(t,e,o)=>{t.exports=o(75251)},11151:(t,e,o)=>{o.d(e,{Z:()=>s,a:()=>a});var r=o(67294);const n={},i=r.createContext(n);function a(t){const e=r.useContext(i);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function s(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(n):t.components||n:a(t.components),r.createElement(i.Provider,{value:e},t.children)}}}]);