-
Notifications
You must be signed in to change notification settings - Fork 5
Working with git submodules
Welcome to the automl_common wiki! In this wiki, we are going to explain some frequently asked questions to help you get started with automl_common in your project.
We will exemplify with Auto-PyTorch, but of course, this can be mimicked as needed. We wanted automl_common to reside in the development's branch autoPyTorch main src folder
git clone git@github.com:automl/Auto-PyTorch.git
cd Auto-PyTorch
git checkout development
git submodule add git@github.com:automl/automl_common.git autoPyTorch/automl_common
git submodule init
Then, we can choose whatever automl_common version suited our needs. Automl_common has different commit hash numbers (as does any project supported with git). With git submodules, your repository can use a specific branch/commit by checking out that commit/branch as follows.
cd autoPyTorch/automl_common
# We wanted the latest code!
git checkout main
git pull
cd ..
Then we just let Auto-PyTorch now about the change by adding this hash from automl_common (and only the hash, notice this is not like git subtree) to Auto-PyTorch's git history (you can see that new files got added to you git status
)
git commit -am "Added automl_common"
There is a simple command to do this:
git submodule update --remote --merge