SharpRSS/git-cmd.md

34 lines
551 B
Markdown
Raw Normal View History

2024-06-16 18:51:52 +02:00
# Submodule
## Add submodule
git submodule add <remote_url> <destination_folder>
git commit -m "Added the submodule to the project."
git push
git submodule update --init --recursive
## Submodule commit
cd <repository>
git add .
git commit -m "Added new commits from the submodule repository"
git push
## Submodule summary
git config --global status.submoduleSummary true
2024-06-17 13:53:48 +02:00
## Update submodule if submodule has changed
git submodule update --remote --merge
2024-06-16 18:51:52 +02:00
2024-06-17 13:53:48 +02:00
git commit -m "Submodule updated!"
2024-06-16 18:51:52 +02:00
## Remove submodule
git rm <path-to-submodule>