User Tools

Site Tools


git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
git [2014/09/02 17:50] – [Git Submodules] admingit [2014/09/02 18:22] – [Update a submodules repo] admin
Line 44: Line 44:
  
  
-====== Git Submodules ======+====== Git Submodules (sub repository) ======
  
-===== Create a Submodule (sub repository) =====+===== Create a Submodule =====
  
 To link one repository into another in git you can use a thing called submodules: To link one repository into another in git you can use a thing called submodules:
Line 54: Line 54:
 Example: Example:
  
 +  cd /YOUR/CLONED/REPO
   git submodule add https://redmine.knallimall.org/git/imagemap/ dokuwiki_imagemap   git submodule add https://redmine.knallimall.org/git/imagemap/ dokuwiki_imagemap
   git add .   git add .
Line 68: Line 69:
  
  
 +===== Update a submodules repo =====
 +
 +When updating a submodule its required to tell the parent repository to use the latest downloaded version.
 +
 +  cd /YOUR/CLONED/REPO/SUBMODULE/
 +  git pull origin master
 +  cd /YOUR/CLONED/REPO
 +  git commit -am "Upgrade submodules ..."
 +  git push origin
 +
 +===== Pull =====
 +
 +  git pull origin
 +  git submodule update
git.txt · Last modified: 2021/01/19 23:58 by admin