Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git add submodule

$ git submodule add <remote_url> <destination_folder>
Comment

git submodule

git submodule add link // add submodule
git submodule update --remote // update submodule
// delete 
git rm -r the_submodule
rm -rf .git/modules/the_submodule

submodule init // before you clone a repo
Comment

git add submodule with different name

git submodule add git@bitbucket.org:ironsand/cookbook-foo.git foo/
Comment

git submodule add

# Submodule is the git feature allowing a repository to include another 
# repository, with control on the branch of shared repository that is 
# considered by the host repository.

# In order to, for your own application, to create a submodule 
# associating the shared repository's main branch, do the following:
"""
git submodule add -b main [URL to Git repo] 
git submodule init
"""
# Now you can do
"""
git add .
git commit -m "folder is now a reusable result"
git push
"""
Comment

git submodule

git submodule sync: Updates the description of submodules cached by git in .git/modules
git submodule update --init --recursive --remote for Updates the working copy
[submodule "api"]
    path = api
    url = https://github.com/<another_repo>/api.git
    branch = main
Comment

git submodule example

$ git submodule init
Submodule 'DbConnector' (https://github.com/chaconinc/DbConnector) registered for path 'DbConnector'
$ git submodule update
Cloning into 'DbConnector'...
remote: Counting objects: 11, done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 11 (delta 0), reused 11 (delta 0)
Unpacking objects: 100% (11/11), done.
Checking connectivity... done.
Submodule path 'DbConnector': checked out 'c3f01dc8862123d317dd46284b05b6892c7b29bc'
Comment

git submodule push

git submodule foreach "git add . && git commit -m 'update' && git push"
Comment

PREVIOUS NEXT
Code Example
Shell :: git commands list 
Shell :: instal kdenlive 
Shell :: powershell array 
Shell :: publish website locally 
Shell :: composer add git repository 
Shell :: what is the ssh credentials for minikube 
Shell :: download docker ubuntu 
Shell :: CMake Error at src/CMakeLists.txt:10 (find_package): By not providing "FindOpenCV.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OpenCV", but CMake did not find one. 
Shell :: pushing code with another github account 
Shell :: find name file in cmd 
Shell :: bash change case 
Shell :: how to install specific package version npm 
Shell :: linux create link to folder 
Shell :: should mocha and chai be npm installed as dependencies or dev dependencies 
Shell :: macbook pro mac address 
Shell :: github fork my own repo 
Shell :: ssh login 
Shell :: docker commit 
Shell :: docker setup 
Shell :: copy paste in git bash 
Shell :: remove directory and contents linux 
Shell :: wsl start distro 
Shell :: delete git branch 
Shell :: drupal cli composer 
Shell :: how to open a folder using terminal 
Shell :: git reset to a specific commit 
Shell :: hard link linux 
Shell :: git force push after reset 
Shell :: setup linux and chrome docker 
Shell :: open /var/lib/docker/tmp/buildkit-mount140273675/Dockerfile.base: no such file or directory 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =