How to add a new feature to FS3D

This article describes how to the code development currently (written 2018) works using git und Bitbucket.

Step-by-step guide

  1. Create an JIRA Issue in the FS3D Board. You will receive an ID like “FS3D-10”.

  2. In the FS3D Board click on the Issue and select Create Branch in the Development Section.

  3. Select the correct repository, specify the branch type (usually “Feature”) and the origin of the branch (usually “develop”).

  4. The branch name is generated automatically.

  5. Create a local copy of the repository if necessary

    git clone https://user@sfb1194.tu-darmstadt.de/bitbucket/scm/b01vof/fs3d.git
    
  6. Get all data from the server

    git fetch
    
  7. Checkout a local copy of the develop and remote branches, for example

    git checkout -b develop origin/develop
    git checkout -b feature/FS3D-10-my_feature origin/feature/FS3D-10-my_feature
    
  8. Implement your feature and commit the changes using the ID, for example “FS3D-10”, in the commit messages.

  9. Once you are finished, switch back to the original branch (usually “develop”) and get the latest updates from the server

    git checkout develop
    git pull
    
  10. Integrate your commits by merging the feature branch into the development branch, for example

    git merge feature/FS3D-10-my_feature
    
  11. Resolve possible merge conflicts (team work!).

  12. Push the changes back to server repository

    git push
    
  13. Delete the feature branch from the server and also locally, for example

     git branch -d feature/FS3D-10-my_feature
     git push origin --delete feature/FS3D-10-my_feature (as of git 1.7.0)
    

Congratulations!

See also