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 revision Previous revision
git [2016/06/08 11:27]
k2patel [Script for Backup]
git [2016/06/08 11:37] (current)
k2patel [Git reset local]
Line 119: Line 119:
 git pull git pull
 </​code>​ </​code>​
 +
 +===== Git Submodule =====
 +
 +==== Clone Repository including submodule ====
 +
 +<code bash>
 +git clone --recursive git@github.com:​k2patel/​repo.git
 +</​code>​
 +
 +==== clone submodule from existing project ====
 +
 +<code bash>
 +git submodule update --init --recursive
 +</​code>​
 +
 +==== To initialize single submodule ====
 +<code bash>
 +git submodule update --init modules/​repo
 +</​code>​
 +
 +==== Pull changes from all submodule ====
 +<code bash>
 +git submodule foreach git pull origin master
 +</​code>​
 +
 +==== Usefull when submodule HEAD and status HEAD messed up ====
 +<code bash>
 +git submodule update --init
 +</​code>​
 +
 +
  
git.txt ยท Last modified: 2016/06/08 11:37 by k2patel