Source code of projects related to courses taught by LT (also student projects).
In general consider to add projects as git submodules. Submodules appear as folders in the git repository hierarchy (although with a changed icon in github) and refer to other git repositories (which might even be private).
goal: have remstef/WatsonSpeechTextDemo
as a submodule in tudarmstadt-lt/courses/qa-examples/watson_speechandtext_demo
- clone
tudarmstadt-lt/courses
repository
$ git clone https://github.com/tudarmstadt-lt/courses.git courses-lt ```
- add submodule
courses-lt/qa-examples$ git submodule add https://github.com/remstef/WatsonSpeechTextDemo.git watson_speechandtext_demo ```
-
within the submodule folder everything is standard git and refers to the remote repository of the submodule, e.g.
git pull
, to update the contents fromremstef/WatsonSpeechTextDemo
orgit commit
andgit push
to push edited content toremstef/WatsonSpeechTextDemo
. -
sync new content from the submodule's repository with the main repository (pull changes, commit updates, push changes)
courses-lt/qa-examples/watson_speechandtext_demo$ git pull courses-lt/qa-examples$ git commit watson_speechandtext_demo -m 'updated submodule' courses-lt/qa-examples$ git push ```
- When you clone
tudarmstadt-lt/courses
, the submodules are not cloned, they appear as empty folders. Run the following commands to pull the content:
$ git submodule init $ git submodule update ```
Alternatively you can add the --recursive
switch to the git clone
command in order to tell git to checkout also the submodules.
$ git clone --recursive https://github.com/tudarmstadt-lt/courses.git courses-lt
- Find further information on submodules here: https://git-scm.com/book/en/v2/Git-Tools-Submodules
- In any place of the hierarchy, type
git remote -v
in order to see the remote path of the current git related commands! - For an overview of submodules in check
.gitmodules
file in the root directory of the repository