Epics@GSI Webhome

Git Tricks Tips Submodule

Introduction

git submodule
, illustrated in a few command line examples.
TIP These examples require at least version 1.7.

adding a submodule to a git directory

  • git submodule add
  • git submodule
  • git submodule init

retrieving a repository with submodules

  • git clone
  • git submodule update

converting a repository into projects with submodules

(H.Brand)
  • create new branch
  • go into sub directory
  • git init
  • create remote bare repository
  • push to (final) remote repository
  • delete local sub directory and
  • replace by add submodule pointing to remote,
  • commit
  • checkout and test
  • merge new branch into current "master"


-- PeterZumbruch - 03 Nov 2014
-- PeterZumbruch - 2014-11-03

This topic: Epics > WebHome > DevelopersCorner > GitTricksTips > GitTricksTipsSubmodule
Topic revision: 2014-11-03, PeterZumbruch
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)