{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/study-guide/guides/this-happens-with-git-commands",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnaeus University","language":"en"}},"mdx":{"fields":{"id":"76be4d2b-3d06-5351-92a9-004e955b63f0","title":"This happens with Git commands","slug":"/study-guide/guides/this-happens-with-git-commands"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"This happens with Git commands\",\n  \"metaTitle\": \"2DV515 | This happens with Git commands\",\n  \"metaDescription\": \"metaDescription\",\n  \"order\": 8\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"Introduction\"), mdx(\"p\", null, \"Git is a version control system, which makes it possible to handle file changes. Git helps determine what has changed, who changed and why.\"), mdx(\"h2\", null, \"Basic Git commands\"), mdx(\"p\", null, \"A prerequisite for working efficiently with version control is to have knowledge of the most basic Git commands and flows they give rise to.\"), mdx(\"p\", null, \"The local computer has three different areas, \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"working directory\"), \", \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"staging area\"), \" and \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"local repository\"), \".\"), mdx(\"p\", null, \"In the \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"working directory\"), \" you make all changes, such as adding new files (marked as \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"untracked\"), \"), modifying files (marked as \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"modified\"), \") and deleting files (marked as \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"deleted\"), \"). By using \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git status\"), \" you can get the current status of your \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"working directory\"), \", and see if there are any changes that need to be added to \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"staging area\"), \".\"), mdx(\"p\", null, \"In order for changes made in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"working directory\"), \" to be sent to \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"local repository\"), \", they must first be placed in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"staging area\"), \", which you do with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git add .\"), \", in preparation for a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"commit\"), \".\"), mdx(\"p\", null, mdx(\"em\", {\n    parentName: \"p\"\n  }, \"Local repository\"), \" contains all \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"commits\"), \" (and \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"branches\"), \").\"), mdx(\"p\", null, \"On a server is what is called a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"remote repository\"), \".\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1035px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/0d98f/git-commands.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"63.32046332046332%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAYAAACpUE5eAAAACXBIWXMAABcRAAAXEQHKJvM/AAACXUlEQVQ4y1WTWW/jOBCE9f9/0LztDrBIZifwOIl1UbZFydYZHTx0JPv4LagkRvJQZLPYKHSzmt40TTjM87zBxW+vKw/JFVn3vK3L7f4z9+t5WRb6fiQKI9ZlwXOEw2eC29U4sDuEiLPckj5FXN7r68qyzN+4oiyJ9g8Yo/HquqZtW6y1N8FhHMmyjKHvv1X00nVk+ZW+779V3DQNTd1tuyelpOu6W5Wzq8haivSI0eqDd5WsqLHnmj5i9PiFX+jVC6LcY4zBS5JkU3ZijjDWYo1h7hu0Uiht0Magtd1aWs2FyWismbDGMtt3waD6vYl7fT/g+wFRFBPHMbEQCJEgkiNhfCQWJ4JIbHEojsRJQpzERElIJAJC4XOInrZn2wRddfv9niAICMJwEzydzqQyI79cKIoCkSTITJIVGadcEKc+/mnPo3jgj7jnV/AXeX1mXVY816LWBmsnukFjtGFSA+qlwY49ehxpXka0Vky6RauRaVoxZmFU7r1X1vmNaVqY5gnPGZKmkqZtqasK1ZaMMqAN7lHywFBmXHOJHnJ09QvVRh/uGqbJYif3xgpjzeaD55abw24UHJaV+YYvc7r8h+mO2PYB1UmqqqAdKuLrI3VXvLc8DCMyy7lcLuT5J3KyLOec5pzSnFReOMv3s5vPPMu2eweX70bPzeZmSlVV3N3dsdvtNnOenp7xfZ8wjIhjwfF44vlweHf2GOKLZ56iHbvgX377/3D//Dc///xAFifW9RVPKbU5WZYlTtzB/R6Hpqm3Ga2q8iN2fEVVl5R1QVldKaorlzJnGN3vWfgf4ea/Hd2qdWMAAAAASUVORK5CYII=')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"Simple Git Flow\",\n    \"title\": \"Simple Git Flow\",\n    \"src\": \"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/e3189/git-commands.png\",\n    \"srcSet\": [\"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/a2ead/git-commands.png 259w\", \"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/6b9fd/git-commands.png 518w\", \"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/e3189/git-commands.png 1035w\", \"/courses/web-intelligence-ht25/static/d7ae084dee428f810e6d4f3b4fcde27c/0d98f/git-commands.png 1276w\"],\n    \"sizes\": \"(max-width: 1035px) 100vw, 1035px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h3\", null, \"git clone \", \"<\", \"repository\", \">\"), mdx(\"p\", null, \"Downloads a repository to your computer. By default, a directory is created, \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"working directory\\\" \"), \", with the name of the repository, containing all files. The argument \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"<repository>\"), \" is a Git URL to a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"remote repository\\\" \"), \" and is called \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"remote origin\\\" \"), \", the location from which the files were originally retrieved.\"), mdx(\"h3\", null, \"git add\"), mdx(\"p\", null, \"After making changes in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"working directory\\\" \"), \", this command marks changes made as \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"staged\"), \", meaning that they are ready for a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"commit\\\" \"), \". With the command \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"given status\"), \" you can check if there are changes that are \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"\\\" staged \\\"\"), \" or not.\"), mdx(\"h3\", null, \"git commit -m '\", \"<\", \"write an imperative message\", \">\", \"'\"), mdx(\"p\", null, \"Saves changes found in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"staging area\\\" \"), \" locally in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"local repository\\\" \"), \".\"), mdx(\"h3\", null, \"git push\"), mdx(\"p\", null, \"Uploads content, \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"commits\\\" \"), \", in \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"local repository\\\" \"), \" to \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"remote repository\\\" \"), \".\"), mdx(\"h3\", null, \"git pull\"), mdx(\"p\", null, \"Merges changes from \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"remote repository\\\" \"), \" with current \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \" \\\"branch\\\" \"), \" (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"main\"), \").\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#introduction","title":"Introduction"},{"url":"#basic-git-commands","title":"Basic Git commands","items":[{"url":"#git-clone-repository","title":"git clone <repository>"},{"url":"#git-add","title":"git add"},{"url":"#git-commit--m-write-an-imperative-message","title":"git commit -m '<write an imperative message>'"},{"url":"#git-push","title":"git push"},{"url":"#git-pull","title":"git pull"}]}]},"parent":{"relativePath":"study-guide/guides/this-happens-with-git-commands.md"},"frontmatter":{"metaTitle":"2DV515 | This happens with Git commands","metaDescription":"metaDescription"}},"allMdx":{"edges":[{"node":{"fields":{"slug":"/","title":"Web Intelligence (2DV515)"}}},{"node":{"fields":{"slug":"/_playground/_todo-examination","title":"TODO: Examination"}}},{"node":{"fields":{"slug":"/_playground","title":"Playground"}}},{"node":{"fields":{"slug":"/assignments/a1","title":"A1 - Recommendation System"}}},{"node":{"fields":{"slug":"/_playground/expectations","title":"Expectations"}}},{"node":{"fields":{"slug":"/assignments/a2","title":"A2 - Clustering"}}},{"node":{"fields":{"slug":"/assignments/a3","title":"A3 - Search Engine"}}},{"node":{"fields":{"slug":"/assignments/a4","title":"A4 - Machine Learning"}}},{"node":{"fields":{"slug":"/assignments","title":"Assignments"}}},{"node":{"fields":{"slug":"/assignments/datasets","title":"Datasets"}}},{"node":{"fields":{"slug":"/lectures","title":"Lectures"}}},{"node":{"fields":{"slug":"/lectures/lecture01","title":"L01 - Introduction"}}},{"node":{"fields":{"slug":"/lectures/lecture02","title":"L02 - Recommendation Systems"}}},{"node":{"fields":{"slug":"/lectures/lecture03","title":"L03 - Clustering"}}},{"node":{"fields":{"slug":"/lectures/lecture04","title":"L04 - Search Engines"}}},{"node":{"fields":{"slug":"/lectures/lecture05","title":"L05 - What is Machine Learning?"}}},{"node":{"fields":{"slug":"/lectures/lecture07","title":"L07 - Naïve Bayes"}}},{"node":{"fields":{"slug":"/projects","title":"Projects"}}},{"node":{"fields":{"slug":"/projects/p2","title":"P2 – Clustering"}}},{"node":{"fields":{"slug":"/projects/p1","title":"P1 – Recommendation System"}}},{"node":{"fields":{"slug":"/projects/p3","title":"P3 – Text Classification"}}},{"node":{"fields":{"slug":"/projects/p4","title":"P4 – Web scraping"}}},{"node":{"fields":{"slug":"/projects/project","title":"Project"}}},{"node":{"fields":{"slug":"/sandbox/code","title":"Code"}}},{"node":{"fields":{"slug":"/sandbox/basic-elements","title":"Basic elements"}}},{"node":{"fields":{"slug":"/sandbox/exercise","title":"Exercises"}}},{"node":{"fields":{"slug":"/sandbox/frontmatter","title":"Frontmatter"}}},{"node":{"fields":{"slug":"/sandbox/hint","title":"Hint"}}},{"node":{"fields":{"slug":"/sandbox","title":"Sandbox"}}},{"node":{"fields":{"slug":"/sandbox/markdown-import","title":"Imported markdown"}}},{"node":{"fields":{"slug":"/sandbox/mermaid","title":"Mermaid"}}},{"node":{"fields":{"slug":"/lectures/lecture06","title":"L06 - Data and Learning"}}},{"node":{"fields":{"slug":"/sandbox/tabs","title":"Tabs"}}},{"node":{"fields":{"slug":"/sandbox/youtube","title":"YouTube"}}},{"node":{"fields":{"slug":"/study-guide/communication","title":"Communication"}}},{"node":{"fields":{"slug":"/study-guide/deadlines-and-submissions","title":"Deadlines and Submissions"}}},{"node":{"fields":{"slug":"/study-guide/grading","title":"Grading"}}},{"node":{"fields":{"slug":"/study-guide/registration","title":"Registration"}}},{"node":{"fields":{"slug":"/study-guide/welcome","title":"🎉 Welcome"}}},{"node":{"fields":{"slug":"/projects/_DEPRECATED/project","title":"Project"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-and-multiple-computers","title":"Git and multiple computers"}}},{"node":{"fields":{"slug":"/study-guide/guides/an-introduction-to-git","title":"An introduction to Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-commit-best-practices","title":"Git commit best practices"}}},{"node":{"fields":{"slug":"/study-guide/guides","title":"Guides"}}},{"node":{"fields":{"slug":"/study-guide/guides/set-up-git","title":"Set up Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/multiple-git-user-configs","title":"Multiple Git user configs"}}},{"node":{"fields":{"slug":"/study-guide/instructors","title":"Instructors"}}},{"node":{"fields":{"slug":"/study-guide/guides/submit-an-assignment-as-a-merge-request","title":"Submit an assignment as a merge request"}}},{"node":{"fields":{"slug":"/study-guide/guides/troubleshooting-ssh","title":"Troubleshooting SSH"}}},{"node":{"fields":{"slug":"/study-guide/guides/this-happens-with-git-commands","title":"This happens with Git commands"}}},{"node":{"fields":{"slug":"/study-guide/readings","title":"Readings"}}},{"node":{"fields":{"slug":"/study-guide","title":"Study Guide"}}}]}},"pageContext":{"id":"76be4d2b-3d06-5351-92a9-004e955b63f0"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}