Git Submodule: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "<source lang="bash"> /opt/chorke/academia ├─ master │ ├─ AcademiaApi │ ├─ AcademiaGui │ └─ AcademiaApp ├─ server │ ├─ ac...")
 
No edit summary
Line 1: Line 1:
<source lang="bash">
<source lang="bash">
/opt/chorke/academia
:'
  ├─ master
/opt/chorke/academia
  │  ├─ AcademiaApi
  ├─ master
  │  ├─ AcademiaGui
  │  ├─ AcademiaApi
  │  └─ AcademiaApp
  │  ├─ AcademiaGui
  ├─ server
  │  └─ AcademiaApp
  │  ├─ academia-init-rmsapi.git
  ├─ server
  │  ├─ academia-init-rmsapi.git
  │  ├─ academia-init-ckiapi.git
  │  └─ academia-init-rmsapi.git
  │  ├─ academia-init-ckirui.git
  └─ client
  │  └─ academia-init-ckiapp.git
      ├─ AcademiaApi
  └─ client
      ├─ AcademiaGui
    ├─ AcademiaApi
      └─ AcademiaApp
    ├─ AcademiaGui
    └─ AcademiaApp
'
cd /opt/chorke/academia/server/
git init --bare academia-init-ckiapi.git
git init --bare academia-init-ckigui.git
git init --bare academia-init-ckiapp.git
</source>


 
<source lang="bash">
# server side
:'
cd  /opt/chorke/academia/server/
/opt/chorke/academia/master/AcademiaApi
git init --bare academia-init-rmsapi.git
git init --bare academia-init-rmsgui.git
git init --bare academia-init-rmsapp.git
 
 
# master/api
cd  /opt/chorke/academia/master/AcademiaApi
   ├─ .gitignore
   ├─ .gitignore
   ├─ LICENSE
   ├─ LICENSE
   └─ README.md
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaApi;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckiapi.git
git add --all; git commit -m 'initial commit'
git push origin master
</source>


 
<source lang="bash">
git init
:'
git remote add origin /opt/chorke/academia/server/academia-init-rmsapi.git
/opt/chorke/academia/master/AcademiaGui
git add --all;git commit -m 'initial commit'
 
 
# master/gui
cd  /opt/chorke/academia/master/AcademiaGui
   ├─ .gitignore
   ├─ .gitignore
   ├─ LICENSE
   ├─ LICENSE
   └─ README.md
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaGui;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckigui.git
git add --all; git commit -m 'initial commit'
git push origin master
</source>


git init
<source lang="bash">
git remote add origin /opt/chorke/academia/server/academia-init-rmsgui.git
:'
git add --all;git commit -m 'initial commit'
/opt/chorke/academia/master/AcademiaApp
 
 
# master/app
cd  /opt/chorke/academia/master/AcademiaApp
   ├─ .gitignore
   ├─ .gitignore
   ├─ LICENSE
   ├─ LICENSE
   └─ README.md
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaApp;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckiapp.git
git add --all; git commit -m 'initial commit'
git push origin master
</source>


git init
<source lang="bash">
git remote add origin /opt/chorke/academia/server/academia-init-rmsapp.git
:'
git add --all;git commit -m 'initial commit'
git submodule add /opt/chorke/academia/server/academia-init-ckiapi.git
git submodule add /opt/chorke/academia/server/academia-init-ckigui.git
git rm --cached academia-init-ckiapi; git rm --cached academia-init-ckigui
git rm --cached .gitmodules; git reset --hard; git clean -fd
rm -rf academia-init-cki*
'
git submodule add /opt/chorke/academia/server/academia-init-ckiapi.git AcademiaApi
git submodule add /opt/chorke/academia/server/academia-init-ckigui.git AcademiaGui


git config -f .gitmodules submodule.AcademiaApi.branch master
git config -f .gitmodules submodule.AcademiaGui.branch master


# master/sub
git commit -m 'academia-ruap-{ckiapi,ckigui} added'
git submodule add /opt/chorke/academia/server/academia-init-apigui.git
git submodule add /opt/chorke/academia/server/academia-init-rmsgui.git
 
git rm --cached .gitmodules
git rm --cached academia-init-rmsapi
git rm --cached academia-init-rmsgui
 
git clean -fd;git reset --hard
rm -rf academia-init-rms*
 
 
git submodule add /opt/chorke/academia/server/academia-init-rmsapi.git AcademiaApi
git submodule add /opt/chorke/academia/server/academia-init-rmsgui.git AcademiaGui
git commit -m 'academia-ruap-{rmsapi,rmsgui} added'
git push origin master
git push origin master
</source>


 
<source lang="bash">
# client/app
#academia/client/AcademiaApp
cd  /opt/chorke/academia/client/
cd  /opt/chorke/academia/client/
git clone /opt/chorke/academia/server/academia-init-rmsapp.git AcademiaApp
git clone /opt/chorke/academia/server/academia-init-ckiapp.git AcademiaApp
cd AcademiaApp/
cd AcademiaApp
 
 
# client/sub
cd  /opt/chorke/academia/client/AcademiaApp/
git submodule init
git submodule init
git submodule update
git submodule update


 
#AcademiaApp/AcademiaGui
# client/gui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
vim HelloGui.txt
vim HelloGui.txt
cd ..
cd ..


 
#academia/client/AcademiaApp
# client/app
vim HelloApp.txt
vim HelloApp.txt
git add --all;git commit -m 'Hello App Added'
git add --all; git commit -m 'Hello App Added'
git status
git status




# client/gui
#AcademiaApp/AcademiaGui
cd AcademiaGui/
cd AcademiaGui/
git add --all;git commit -m 'Hello Gui Added'
git add --all; git commit -m 'Hello Gui Added'
git status
git status
cd ..
cd ..


 
#academia/client/AcademiaApp
# client/app
git status
git status
git submodule status --recursive
git submodule status --recursive
git submodule foreach git push -u origin master
git submodule foreach git push -u origin master
git submodule foreach git pull origin master
git submodule foreach git pull origin master


# master/gui
#academia/master/AcademiaGui
cd /opt/chorke/academia/master/AcademiaGui/
cd /opt/chorke/academia/master/AcademiaGui/
git pull origin master
git pull origin master


# client/sub/gui
#client/AcademiaApp/AcademiaGui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
git checkout master
git checkout master; vim HelloGui.txt
vim HelloGui.txt
git add --all;git commit -m 'Hello GUI Added'
git add --all;git commit -m 'Hello GUI Added'
git push origin master
git push origin master
cd ..
cd ..


# client/app
#academia/client/AcademiaApp
git add AcademiaGui
git add AcademiaGui
git commit -m 'AcademiaGui updated'
git commit -m 'AcademiaGui updated'
git push origin master
git push origin master
git config -f .gitmodules submodule.AcademiaApi.branch master
git config -f .gitmodules submodule.AcademiaGui.branch master


# master/gui
# master/gui
cd /opt/chorke/academia/master/AcademiaGui/
cd /opt/chorke/academia/master/AcademiaGui/
vim HelloAdd.txt
vim HelloAdd.txt
git add HelloAdd.txt;git commit -m 'Hello Add Text File Added'
git add HelloAdd.txt;git commit -m 'Hello Add Text File Added'
Line 139: Line 132:


# client/sub/gui
# client/sub/gui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
git pull origin master
git pull origin master
cd ..
cd ..
Line 150: Line 143:


# master/gui
# master/gui
cd /opt/chorke/academia/master/AcademiaApp/
cd /opt/chorke/academia/master/AcademiaApp/
git submodule foreach git pull origin master
git submodule foreach git pull origin master
git pull origin master
git pull origin master
</source>
</source>

Revision as of 09:50, 12 December 2019

:'
/opt/chorke/academia
  ├─ master
  │  ├─ AcademiaApi
  │  ├─ AcademiaGui
  │  └─ AcademiaApp
  ├─ server
  │  ├─ academia-init-ckiapi.git
  │  ├─ academia-init-ckirui.git
  │  └─ academia-init-ckiapp.git
  └─ client
     ├─ AcademiaApi
     ├─ AcademiaGui
     └─ AcademiaApp
'
cd /opt/chorke/academia/server/
git init --bare academia-init-ckiapi.git
git init --bare academia-init-ckigui.git
git init --bare academia-init-ckiapp.git
:'
/opt/chorke/academia/master/AcademiaApi
   ├─ .gitignore
   ├─ LICENSE
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaApi;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckiapi.git
git add --all; git commit -m 'initial commit'
git push origin master
:'
/opt/chorke/academia/master/AcademiaGui
   ├─ .gitignore
   ├─ LICENSE
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaGui;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckigui.git
git add --all; git commit -m 'initial commit'
git push origin master
:'
/opt/chorke/academia/master/AcademiaApp
   ├─ .gitignore
   ├─ LICENSE
   └─ README.md
'
cd /opt/chorke/academia/master/AcademiaApp;git init
git remote add origin /opt/chorke/academia/server/academia-init-ckiapp.git
git add --all; git commit -m 'initial commit'
git push origin master
:'
git submodule add /opt/chorke/academia/server/academia-init-ckiapi.git
git submodule add /opt/chorke/academia/server/academia-init-ckigui.git
git rm --cached academia-init-ckiapi; git rm --cached academia-init-ckigui
git rm --cached .gitmodules; git reset --hard; git clean -fd
rm -rf academia-init-cki*
'
git submodule add /opt/chorke/academia/server/academia-init-ckiapi.git AcademiaApi
git submodule add /opt/chorke/academia/server/academia-init-ckigui.git AcademiaGui

git config -f .gitmodules submodule.AcademiaApi.branch master
git config -f .gitmodules submodule.AcademiaGui.branch master

git commit -m 'academia-ruap-{ckiapi,ckigui} added'
git push origin master
#academia/client/AcademiaApp
cd  /opt/chorke/academia/client/
git clone /opt/chorke/academia/server/academia-init-ckiapp.git AcademiaApp
cd AcademiaApp
git submodule init
git submodule update

#AcademiaApp/AcademiaGui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
vim HelloGui.txt
cd ..

#academia/client/AcademiaApp
vim HelloApp.txt
git add --all; git commit -m 'Hello App Added'
git status


#AcademiaApp/AcademiaGui
cd AcademiaGui/
git add --all; git commit -m 'Hello Gui Added'
git status
cd ..

#academia/client/AcademiaApp
git status
git submodule status --recursive
git submodule foreach git push -u origin master
git submodule foreach git pull origin master

#academia/master/AcademiaGui
cd /opt/chorke/academia/master/AcademiaGui/
git pull origin master

#client/AcademiaApp/AcademiaGui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
git checkout master; vim HelloGui.txt
git add --all;git commit -m 'Hello GUI Added'
git push origin master
cd ..

#academia/client/AcademiaApp
git add AcademiaGui
git commit -m 'AcademiaGui updated'
git push origin master

# master/gui
cd /opt/chorke/academia/master/AcademiaGui/
vim HelloAdd.txt
git add HelloAdd.txt;git commit -m 'Hello Add Text File Added'
git push origin master

# client/sub/gui
cd /opt/chorke/academia/client/AcademiaApp/AcademiaGui/
git pull origin master
cd ..

# client/app
git status
git add AcademiaGui
git commit -m 'AcademiaGui updated'
git push origin master

# master/gui
cd /opt/chorke/academia/master/AcademiaApp/
git submodule foreach git pull origin master
git pull origin master