master branch contains the currently released version of the code.
master is automatically created on repository creation.
develop branch is used to merge different
dev_feature branches and
prepare for the next release version.
After creation of the git repository and, if required, an initial checkin of existing code, the
branch is created from
develop is merged into
master. It can be deleted when the
project is finished and no more development activity is intended.
dev_feature branches, with
feature being a placeholder for a feature or
bugfix name, contain the actual development work for a single goal. When
development on a
dev_feature branch has produced a usable piece of
dev_feature branch can be merged into
propagation towards a release.
hotfix_bug branches, with
bug being a placeholder for a descriptive tag,
are used for development of fixes of urgent issues in release versions.
hotfix_bug branches are created from
When the hotfix has been written and tested, they are merged into
develop if necessary, and deleted.
All procedures assume that all local repositories are updated before doing
any work on non-local branches, and that any write operations on
are coordinated between developers.
develophave been made, rebase from
developas desired or required
master, and merge
git tag -s -m 'release XX-YNN.MM' XX-YNN_MM
develop, merge from
master(to get the metadata stuff correct)
hotfix_bug, preferably using only one commit (for more comfortable cherry-picking later on)
master, merge from
git tag -s -m 'hotfix XX-YNN.MM for <bug description>' XX-YNN_MM_F
develop, cherry-pick from
hotfix_bug, test and fix
F in the release tag is an incrementing decimal minor version number,
counting hotfixes for this software release. It is not zero-padded.
On the server:
mkdir /srv/git/.../<dir>.git cd !$ git --bare init --shared
In the local development directory
cd .../<dir> git init git add <file1> <file2> ... git remote add origin <server alias>:<dir> git commit -m 'initial checkin' git push --set-upstream origin master
git checkout -b devbranch git push --set-upstream origin devbranch
git checkout --track origin/dev-ha_stated
git push origin --delete <branch name>
On every (other) local repo:
git remote prune origin
*~ *.1.gz *.8.gz *.cfg *cscope* *.dep *.eep *.elf *.hex *.log *.lss *.lst *.map *.o obj *.pyc *.sym # EAGLE *.b#? *.s#? # Eclipse stuff follows... /Debug /Release # PyCharm stuff follows... .idea # CMake CMakeCache.txt CMakeFiles cmake_install.cmake # 3d design *.stl *.gcode