Commit c9509621 authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

Update documentation to include git development flow

parent 47949ca8
......@@ -48,6 +48,64 @@ Unit tests are run by [Karma][] and written with [Jasmine][]. They're located in
grunt test
# Development
## Development methodology
#### Fixing bugs and building features on dedicated branches
It is a best practice to fix a bug and develop a new feature on a dedicated git branch, then, after finishing that task, merging the made changes back into the *master* branch.
* For the whole development group, this helps in maintaining a working DDA Wizard version in the *master* branch - it will never contain a half-baked version.
* For the individual developer(s) working on the branch, it helps to develop on their task with a known DDA Wizard git project state, and changes on the *master* made concurrently by others won't interfere with their work.
* The finalizing merge into master allows to see the *set of changes* made to the whole DDA Wizard git project that are required to show *what* had to be changed in order to fulfill the feature/bugfix.
Follow the following steps in order to work with branches:
cd ~/git/dda-wizard/
git checkout master
# get the current DDA Wizard repository state into your local repository
git pull
# create a new FEATURE or BUGFIX branch and give it a meaningful name
git checkout -b FEATURE-fancy-feature
# ... make modifications on this branch FEATURE-fancy-feature
# commit these changes,
# and in case a work-in-progress at the end of the day leaves your branch in an inconsistent, nonworking state,
# then add a 'WIP' work in progress prefix for references.
git add X Y Z
git commit -m "WIP foo"
# save those changes also on the upstream branch
git push
# maybe on first branch push, git will ask you to set the upstream branch...
# ... in that case, just copy and paste the set-upstream command as provided by git
# make some more edits, adds and commits on the local branch...
# you now think you have finished all work on this branch, git push your branch a final time ...
# DDA Wizard's Jenkins will deploy your branch to dda-wizard.svko-dda-test.gesis.intra ...
# Have all feature/bugfix stakeholders (e.g. Agathe) play with the svko-dda-test instance and give you feedback
# Assuming now that you and all others are happy with what this branch provides, merge that branch into master ...
# First you checkout your local master branch
git checkout master
# fetch and merge latest origin/master commits into your local master branch:
git pull
# now local master branch is up-to-date
# now merge local FEATURE-fancy-feature into your local master:
git merge --no-ff FEATURE-fancy-feature
# in case of merge conflicts, resolve the conflicts (hint: `git mergetool`)
git commit # that's right, don't provide a commit message. Git will generate one for you.
# assuming "merge --no-ff ..." worked, push this commit to remote repository...
git push
# make a final quality assurance test on svko-dda-test, and make sure that both your new changes and all previously developed features and bugfixes work smoothly together...
## In-memory database
You can interact with the h2 in-memory database by visiting its web interface at [http://localhost:8080/h2-console](http://localhost:8080/h2-console). As *JDBC URL*, provide `jdbc:h2:mem:dda`. As *User Name*, provide DDA. Keep *Password* empty.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment