---
url: 'https://metadrop.net/es/articulos/anadir-un-submodulo-en-git-git-submodule-add'
title: 'Añadir un submódulo en git (git submodule add)'
author: 'Luis Inchausti'
date: '2017-01-17T10:23:54+00:00'
updated: '2026-06-10T06:58:05+00:00'
type: article
summary: 'Sentencias necesarias para añadir un submódulo de git dentro de otro principal.'
tags:
  - Git
image: 'https://metadrop.net/modules/custom/metadrop_schema/images/metadropnet-social.jpg'
published: true
og:
  site_name: Metadrop
  'image:type': image/jpeg
  'image:width': '1200'
  'image:height': '630'
  'image:alt': Metadrop
  locale: es_ES
schema:
  '@context': 'https://schema.org'
  '@graph':
    -
      '@type': Article
      '@id': 'https://metadrop.net/es/articulos/anadir-un-submodulo-en-git-git-submodule-add#article'
      name: 'Añadir un submódulo en git (git submodule add)'
      headline: 'Añadir un submódulo en git (git submodule add)'
      description: 'Sentencias necesarias para añadir un submódulo de git dentro de otro principal.'
      about: Git
      image:
        '@type': ImageObject
        url: 'https://metadrop.net/modules/custom/metadrop_schema/images/metadropnet-social.jpg'
        width: '1200'
        height: '630'
      datePublished: '2014-05-27T08:00:00+0200'
      dateModified: '2026-06-10T08:58:05+0200'
      author:
        '@type': Person
        name: 'Luis Inchausti'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
      mainEntityOfPage: 'https://metadrop.net/es/articulos/anadir-un-submodulo-en-git-git-submodule-add'
    -
      '@type': Organization
      '@id': 'https://metadrop.net/#organization'
      url: 'https://metadrop.net/'
      name: Metadrop
      sameAs:
        - 'https://www.drupal.org/metadrop'
        - 'https://x.com/metadrop'
        - 'https://asociaciondrupal.es/partner/metadrop'
        - 'https://www.linkedin.com/company/metadrop'
      telephone: '+34910053180'
      contactPoint:
        '@type': ContactPoint
        telephone: '+34910053180'
        email: hola@metadrop.net
        availableLanguage:
          - Spanish
          - English
        contactType: 'customer service'
      logo:
        '@type': ImageObject
        url: 'https://metadrop.net/modules/custom/metadrop_schema/images/logo-metadrop-500-500.jpg'
        width: '500'
        height: '500'
      address:
        '@type': PostalAddress
        streetAddress: 'Calle Virgen de Nuria 23'
        addressLocality: Madrid
        addressRegion: Madrid
        postalCode: '28027'
        addressCountry: ES
    -
      '@type': ItemPage
      '@id': 'https://metadrop.net/es/articulos/anadir-un-submodulo-en-git-git-submodule-add'
      breadcrumb:
        '@type': BreadcrumbList
        itemListElement:
          -
            '@type': ListItem
            position: 1
            name: Inicio
            item: 'https://metadrop.net/es'
          -
            '@type': ListItem
            position: 2
            name: 'Artículos expertos sobre Drupal y tecnología'
            item: 'https://metadrop.net/es/articulos'
      publisher:
        '@type': Organization
        '@id': 'https://metadrop.net/#organization'
---
 1. [Artículos](https://metadrop.net/es/articulos)
 
  

# Añadir un submódulo en git (git submodule add)

Martes 27 de Mayo de 2014

 

 



Sentencias necesarias para añadir un submódulo de git dentro de otro principal.



   



Para incorporar un submódulo debemos usar la siguiente sintaxis:

```bash
git submodule add [-b <nombre_rama>] <repositorio> <ruta>
```

Ejemplo:

```bash
git submodule add -b 7.x-1.x GeduR@git.drupal.org:project/ga_push.git sites/all/modules/custom/ga_push
```



[Git](https://metadrop.net/es/articulos?text=Git)