Skip to content

Developing ofxKinect

Dan Wilcox edited this page Aug 13, 2013 · 6 revisions

Note: As of OpenFrameworks 0.8.0, ofxKinect has been integrated into the OF core. All future development of this addon will take place in the main OF Github repo so please log issues there.

Branch Layout

master is developed against the current Open Frameworks master

develop is the unstable development branch for master

When adding new features or fixing bugs, create a branch to do your work in. Others can then test this branch and later merge it.

Development for master is done in the develop branch and then merged.

When a new stable version of OF is released, the current master is tagged with a version number matching the OF version.

This development model follows the OpenFrameworks core model.

Git Help

Colored Output

Use the following commands to setup colored output form git which makes it easier to see changes:

git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto

Git Cheatsheet

Print the git help:

git --help

Print the help on a specific git tool:

git help checkout

Switching to a branch:

git checkout branchname

Show which branch you are currently working in:

git branch -v

Creating a new branch:

git branch branchname

Deleting a branch:

git branch -d branchname

Show the log of the last 10 commits:

git log -10

Resolving Merge Conflicts

See this useful guide on how to resolve merge conflicts.

Developing

Checkout the develop branch:

git git://github.com/ofTheo/ofxKinect.git -b develop

Switch to the develop branch:

git checkout develop

Changes done in develop will be brought into master periodically. Anything large, new, and/or radical should be done in a separate feature branch from develop.

The work flow is as follows:

  • do your commits in develop
  • switch to the master branch:
    git checkout master
    
  • merge from branch to master:
    git merge develop
    
  • if you have any conflicts, follow this guide on how to resolve merge commits
  • push your changes to github:
    git push origin master
    

Adding New Features

If you want to add a feature, create a branch of develop, do your work, and merge the branch back to develop. If everything is alright, the changes can then be merged from develop to master.

The workflow is as follows:

  • create a new branch for the feature from develop:
    git checkout -b newfeature develop
    
  • do your work, make commits, etc
  • merge these changes to develop:
    git checkout develop
    git merge --no-ff newfeature
    
  • close the feature branch:
    git checkout develop 
    git branch -d newfeature
    git push origin develop 
    

Making Bugfixes Across Branches:

If you want to fix a bug found in master, do not do it directly, but through a branch which can then be merged across the main branches:

The workflow is as follows:

  • create a new branch for the bugfix:
    git checkout -b newbugfix master
    
  • do your work, make commits, etc
  • merge these changes to master:
    git checkout master
    git merge --no-ff newbugfix
    
  • merge these changes to develop:
    git checkout develop
    git merge --no-ff newbugfix
    git push origin develop
    
  • close the bugfix branch:
    git checkout master 
    git branch -d newbugfix
    git push origin master
    

Versioning

When a stable version of OF is released, the stable ofxKinect will be tagged with the same version number. This way, users can match a working ofxKinect with a working OpenFrameworks.

For example, To tag a version:

git tag 0062 -m "tagging 0062"
# push to github
git push --tags

If you make a mistake and need to delete the tag:

git tag -d 0062
# tell github to remove the tag
git push origin :0062