Skip to content

Git Notes

John Reppy edited this page Aug 5, 2024 · 5 revisions

This document collects together some common git patterns that we use to manage the SML/NJ development branch.

Checkout

git clone --recurse-submodules git@github.com:smlnj/smlnj.git

Update the LLVM submodule to the latest version

Switch to the submodule directory and then update to the latest version. Then we have to commit and push the submodule. Note that the name of the LLVM submodule changes over time as we update the version of LLVM that we are using.

# switch to the submodule directory
cd runtime/llvm10

# checkout the main branch
git checkout main

# pull the latest version
git pull

# switch back to the parent repo
cd ../..

# update the parent repo
git commit -a -m "update version of code generator submodule"
git push

Update a copy of the repository

Include the --recurse-submodules option when pulling the code to ensure that we get any changes to the submodule.

git pull --recurse-submodules

Adding a new version of LLVM as a submodule

git submodule add https://github.com/smlnj/smlnj-llvm-18.1.git llvm18

Clone this wiki locally