...
Code Block |
---|
language | bash |
---|
title | start.shAdd your project as submodule |
---|
|
cd opi
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
## here add your new submodule
git submodule add <your repository_URL> [<submodule_path>]
git commit -m "your comment Add submodule <submodule_name>"
git push origin <your remote branch i.e main/master> |
...
Code Block |
---|
language | bash |
---|
title | start.sh |
---|
|
cd opi
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
## here add your folder/files
git add <your files/folder>
git commit -m "your comment " .
git push origin <your remote branch i.e main/master> |
Update an existing OPI submodule:
Code Block |
---|
title | Procedure for the OPI submodule update |
---|
|
cd /<your git local directory>/epik8-<beamline name>
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
cd opi/<OPI TYPE>/<submodule name> ## fro example RF/sparc-rf-opi
git pull ## to update the submodule
cd ..
git add <submodule name>
git commit -m "<your message>"
git push origin ## add HEAD:main to this command line if you are in a detached HEAD
cd ../.. ## to go in the master repository
git add opi/
git commit -m "<your message>"
git push origin |
If, in any moment in the update procedure, git says that you are not in a branch you can type:
Code Block |
---|
title | Enter an existing branch |
---|
|
git branch ## to verify the available branches (typically "main" for the submodule and "master" for the main repository)
git switch <name of the branch> |
to enter in the correct branch.