Skip to content

dev WorkingWithGit

oguyon edited this page Apr 10, 2021 · 3 revisions

Working with git


1. Releasing a new version

In dev branch:

  • Update version number in the CMakeList.txt
  • Edit version number in README.md
  • (optional) copy .gitmodules-default to .gitmodules

Update main branch to current dev branch.

git checkout main
git merge dev

Issue a git tag for the version:

git tag -a vX.YY.ZZ -m "milk version X.YY.ZZ"
git push origin vX.YY.ZZ
git push

Then jump back to dev branch

git checkout dev
git merge main

And revert to the development version of .gitmodules :

cp .gitmodules-local .gitmodules

2. Source Code Documentation (doxygen)

Documentation tree can be locally built on dev branch with doxygen from main directory :

$ git checkout dev
$ doxygen

To push it on the origin :

$ cd dochtml/html
$ git add *
$ git commit -am 'updated doxygen documentation'
$ git push

When switching branches, you may get an error message "The following untracked working tree files would be overwritten by checkout" preventing branch switch. If the error only lists files in the html directory, you can safely use the -f option to force branch change.