Skip to content

Instantly share code, notes, and snippets.

@1951FDG
Last active December 10, 2017 16:19
Show Gist options
  • Save 1951FDG/8ab4c1ed2ffe5872d8dc to your computer and use it in GitHub Desktop.
Save 1951FDG/8ab4c1ed2ffe5872d8dc to your computer and use it in GitHub Desktop.
Git How To: Submodules
git submodule add -b master [email protected]:/1951FDG/pt.git ProcessTimer
git config -f .gitmodules submodule.ProcessTimer.branch master
git submodule add [email protected]:PaddleHQ/Mac-Framework.git
git config -f .gitmodules submodule.Mac-Framework.url [email protected]:PaddleHQ/Mac-Framework.git
cd Mac-Framework
git checkout b684ec709b0cce91a7c2bc079cbe60407ad1b91b
git show b684ec709b0cce91a7c2bc079cbe60407ad1b91b
git init
git remote add origin [email protected]:/1951FDG/SixtyFour.git
git pull origin master
git submodule status
git submodule init
git submodule update
git submodule update --remote ProcessTimer
#Init submodules
git submodule update --init --recursive
#Update submodule
cd ~/Developer/SixtyFour
cd ProcessTimer
git pull origin master
#Update submodule to specific commit
cd ~/Developer/SixtyFour
cd ProcessTimer
git fetch origin master
git log --oneline master..origin/master
git merge <commit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment