{"id":20217,"date":"2020-07-25T00:44:33","date_gmt":"2020-07-25T07:44:33","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=20217"},"modified":"2023-12-01T03:56:09","modified_gmt":"2023-12-01T11:56:09","slug":"git-submodules","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/git-submodules\/","title":{"rendered":"Git Submodules: A Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">How to Use Git Submodules<\/h2>\n\n\n\n<p>As a <a href=\"https:\/\/careerkarma.com\/blog\/what-is-git\/\">Git<\/a> repository grows in size, you\u2019ll probably find yourself depending on other repositories. A blog project may depend on another repository that stores the code for a particular theme. A software project may depend on a particular, in-house version of a framework.<br><\/p>\n\n\n\n<p>How do you connect these repositories together? That\u2019s where submodules come in handy.<br><\/p>\n\n\n\n<p>In this tutorial, we\u2019re going to talk about what submodules are and why they are useful. We\u2019ll walk through a few examples of how to set up a repository with submodules to help you get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Submodule?<\/h2>\n\n\n\n<p>A submodule is a link to a repository within a Git repository. It makes it easy to connect different repositories together which depend on each other.<br><\/p>\n\n\n\n<p>Submodules are a good way to link plugins and themes into your code. The links created by submodules will make it easier to navigate around your codebase.<br><\/p>\n\n\n\n<p>They\u2019re not a perfect fit for every project. Before you create a submodule, you should ask whether there is a better alternative available. Dependency management projects like npm and rubygems may be more convenient to use. This is because they are easy to configure and have extensive, language-specific management tools.<br><\/p>\n\n\n\n<p>Submodules are not downloaded to a repository by default. We\u2019ll talk about this later on.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Create a Submodule<\/h2>\n\n\n\n<p>We\u2019re going to use submodules to create a link between Career Karma\u2019s Git repositories. The repository we create will have a link to all of our other tutorials.<br><\/p>\n\n\n\n<p>The repository we are going to create our submodule in is called git-submodules.<br><\/p>\n\n\n\n<p>First, we\u2019ll need to navigate into our repository. We\u2019re going to create a submodule that references a repository called web-tutorials. Adding a submodule is accomplished using the submodule add method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git submodule add https:\/\/github.com\/Career-Karma-Tutorials\/web-tutorials web<\/pre><\/div>\n\n\n\n<p>This command creates a folder called \u201cweb\u201d inside the git-submodules repository. Let\u2019s take a look inside our repository using the <code>ls<\/code> command:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/bvhGxlYkXnPGjPt0F686lLNmZmr3vV6fVlULXl9rlFF13kdtsHltft_HodePx3SkxrWCiJspEJ-znac7KNNOqVZoNSjI6EzyygcgWX2gJ6RWq_lV4Z8vqrv7LsDSsOp938o8-k0r\" alt=\"\"\/><\/figure>\n\n\n\n<p>We now have a link to our web-tutorials repository. Now that we have created this link, we can add it to our remote repository using <a href=\"https:\/\/careerkarma.com\/blog\/git-add\/\">git add<\/a> and <a href=\"https:\/\/careerkarma.com\/blog\/git-commit\/\">git commit<\/a>:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git add web\/\ngit commit -m &quot;feat: Create submodule Career-Karma-Tutorials\/web-tutorials&quot;\ngit push<\/pre><\/div>\n\n\n\n<p>This code will commit our \u201cweb\u201d folder to our remote repository.<br><\/p>\n\n\n\n<p>Our repository is associated with GitHub. The GitHub platform has a nice feature which adds in a link to the repository associated with a submodule:<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/ArAby-PC3vanT71NAjTXn8oxIFEefpnZMwtiwX1ze4N6sfhiZIeKRPravA92KNQmg3kp79QefAoUYD9np_gOnumbBrVi2GLKq162I5tGXZl9c3H33O_LqjCNZtmtItpaiATjRF-q\" alt=\"\"\/><\/figure>\n\n\n\n<p>Our submodule has been successfully created! When you click on the link in GitHub, it will take you to the web-tutorials repository to which our submodule points.<br><\/p>\n\n\n\n<p>Any command that we execute inside the \u201cweb\u201d folder will affect the web-tutorials repository. This is because a submodule is just like a version of a repository inside a repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Clone a Project with Submodules<\/h2>\n\n\n\n<p>If you use git clone on a repository with submodules, you would get a copy of everything inside a repository except the submodules. There would be no code inside any submodule folder.<br><\/p>\n\n\n\n<p>This is because submodules are not downloaded by default. There are two ways to retrieve the contents of a submodule and download them to your local machine.<br><\/p>\n\n\n\n<p>You can download the contents of submodules by specifying the &#8211;recursive flag in your git clone statement:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git clone https:\/\/github.com\/Career-Karma-Tutorials\/git-submodules<\/pre><\/div>\n\n\n\n<p>Cloning is the most convenient method of retrieving submodules. If you have already cloned a project and want to download its submodules, you can use this command:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git submodule update --remote --recursive<\/pre><\/div>\n\n\n\n<p>The git submodule update command will fetch all the submodules from a repository that is already on your local machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Update a Submodule<\/h2>\n\n\n\n<p>Any changes you make to the parent repository to which a submodule links will not be reflected in your main repository. This is because submodules are linked to a particular commit.<br><\/p>\n\n\n\n<p>You can update the local version of a submodule like you would with any Git repository. Let\u2019s update our \u201cweb\u201d submodule:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>cd web\ngit fetch\ngit merge origin\/master<\/pre><\/div>\n\n\n\n<p>This will fetch the branch \u201cmaster\u201d on the origin associated with the \u201cweb\u201d submodule.&nbsp;<br><\/p>\n\n\n\n<p>If you want to update multiple submodules, you can use the submodule update command. This will retrieve the latest commit in all the repositories listed as a submodule in a project:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git submodule update --remote --recursive<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Delete a Submodule<\/h2>\n\n\n\n<p>There are three steps you need to take to delete a submodule.<br><\/p>\n\n\n\n<p>You should start by removing a reference to a submodule from your repository:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git submodule deinit web<\/pre><\/div>\n\n\n\n<p>\u201cweb\u201d is the path of the submodule that we are going to remove. Next, we need to remove it from our Git repository by running git rm:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git rm web\/\ngit commit -m &quot;feat: Remove web submodule&quot;\ngit push<\/pre><\/div>\n\n\n\n<p>This removes the \u201cweb\u201d submodule directory from our code.<br><\/p>\n\n\n\n<p>We\u2019re not done just yet. We need to remove the hidden reference to our submodule which exists inside the .git folder in the root directory of our project:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>rm -rf .git\/modules\/web\/*<\/pre><\/div>\n\n\n\n<p>This will remove all the remaining traces of our submodule.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to View the Status of a Submodule<\/h2>\n\n\n\n<p>Submodules are references to a Git repository. This means that you can find out what files have been modified since the last commit. We can do this using the git status command.<br><\/p>\n\n\n\n<p>First, we\u2019ve got a bit of configuring to do. We need to enable a config option called status.submodulesummary. This will include any changes you have made to submodules inside the output of the git status command. Let\u2019s enable this option:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git config status.submodulesummary<\/pre><\/div>\n\n\n\n<p>Now that we\u2019ve configured this option, we can use git status to view the status of our entire repository, including its submodules:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>git status<\/pre><\/div>\n\n\n\n<p>Here\u2019s what this command returns when no changes have been made to a repository:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>On branch master\nYour branch is up to date with 'origin\/master'.\n\nnothing to commit, working tree clean<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Submodules are links to a Git repository within a repository. They make it easy to create a connection between multiple projects that depend on one another.<br><\/p>\n\n\n\n<p>Here\u2019s a quick cheat sheet that you can use to help you work with submodules:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>git add submodule: Adds a submodule to a repository<\/li><li>git update submodule &#8211;remote: Updates the submodules in a repository.<\/li><li>git submodule deinit: Removes a submodule from a repository.<\/li><\/ul>\n\n\n\n<p>Now you\u2019re ready to start working with Git submodules like an expert developer!<\/p>\n","protected":false},"excerpt":{"rendered":"How to Use Git Submodules As a Git repository grows in size, you\u2019ll probably find yourself depending on other repositories. A blog project may depend on another repository that stores the code for a particular theme. A software project may depend on a particular, in-house version of a framework. How do you connect these repositories&hellip;","protected":false},"author":240,"featured_media":15905,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17286],"tags":[],"class_list":{"0":"post-20217","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-git"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Coding","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Git Submodules: A Step-By-Step Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/git-submodules\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Git Submodules: A Guide\" \/>\n<meta property=\"og:description\" content=\"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/git-submodules\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-25T07:44:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:56:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"677\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Git Submodules: A Guide\",\"datePublished\":\"2020-07-25T07:44:33+00:00\",\"dateModified\":\"2023-12-01T11:56:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/\"},\"wordCount\":998,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/blur-close-up-code-computer-546819-1.jpg\",\"articleSection\":[\"Git\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/\",\"name\":\"Git Submodules: A Step-By-Step Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/blur-close-up-code-computer-546819-1.jpg\",\"datePublished\":\"2020-07-25T07:44:33+00:00\",\"dateModified\":\"2023-12-01T11:56:09+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/blur-close-up-code-computer-546819-1.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/blur-close-up-code-computer-546819-1.jpg\",\"width\":1020,\"height\":677},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/git-submodules\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/code\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Git Submodules: A Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Git Submodules: A Step-By-Step Guide | Career Karma","description":"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/careerkarma.com\/blog\/git-submodules\/","og_locale":"en_US","og_type":"article","og_title":"Git Submodules: A Guide","og_description":"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.","og_url":"https:\/\/careerkarma.com\/blog\/git-submodules\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-25T07:44:33+00:00","article_modified_time":"2023-12-01T11:56:09+00:00","og_image":[{"width":1020,"height":677,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Git Submodules: A Guide","datePublished":"2020-07-25T07:44:33+00:00","dateModified":"2023-12-01T11:56:09+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/"},"wordCount":998,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg","articleSection":["Git"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/git-submodules\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/","url":"https:\/\/careerkarma.com\/blog\/git-submodules\/","name":"Git Submodules: A Step-By-Step Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg","datePublished":"2020-07-25T07:44:33+00:00","dateModified":"2023-12-01T11:56:09+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Git submodules are links to an external Git repository. On Career Karma, learn how to create and work with Git submodules.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/git-submodules\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/blur-close-up-code-computer-546819-1.jpg","width":1020,"height":677},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/git-submodules\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Coding","item":"https:\/\/careerkarma.com\/blog\/code\/"},{"@type":"ListItem","position":3,"name":"Git Submodules: A Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=20217"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/20217\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/15905"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=20217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=20217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=20217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}