# Updating SMTK on CMB master and release

**URL:** https://discourse.kitware.com/t/updating-smtk-on-cmb-master-and-release/204
**Category:** Computational Model Builder (CMB)
**Created:** [December 20, 2018, 8:59pm UTC](https://discourse.kitware.com/t/updating-smtk-on-cmb-master-and-release/204 "2018-12-20T20:59:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tj.corona](https://discourse.kitware.com/user_avatar/discourse.kitware.com/tj.corona/32/35_2.png) [@tj.corona](https://discourse.kitware.com/u/tj.corona)
#### Post date: [December 20, 2018, 8:59pm UTC](https://discourse.kitware.com/t/updating-smtk-on-cmb-master-and-release/204/1 "2018-12-20T20:59:52Z")

</div>

I wanted this to be written down in a place where all who contribute can find it when they need it. CMB has a master and a release branch, and each has a submodule that tracks its respective SMTK branch. The **right** way to simultaneously bump CMB’s SMTK on both release and master is as follows:

- Create a branch off of CMB master  
`$ git checkout master`  
`$ git checkout -b update-smtk-to-latest-master`

- Update SMTK to the latest master  
`$ cd <src>/thirdparty/smtk`  
`$ git checkout master`  
`$ git pull`  
`$ cd ..`  
`$ git add .`  
`$ git commit -m "Update smtk to latest master"`

- Create a branch off of CMB release  
`$ git checkout release`  
`$ git checkout -b update-smtk-to-latest-release`

- Update SMTK to the latest release  
`$ cd <src>/thirdparty/smtk`  
`$ git checkout release`  
`$ git pull`  
`$ cd ..`  
`$ git add .`  
`$ git commit -m "Update smtk to latest release"`

- Merge the release branch into the master branch (so the master branch has the right history)  
`$ git checkout update-smtk-to-latest-master`  
`$ git merge -s ours update-smtk-to-latest-release`

- Submit a merge request with the appropriate backport command  
`$ git push <personal_repo>`  
In the merge request’s description:  
`Backport: release:HEAD^2`

- Test both release and master branches  
`Do: test --merged`
