From 9a19a65edc2059f2c94d690248fe4babc11f58b3 Mon Sep 17 00:00:00 2001 From: Michael Hierweck Date: Fri, 26 Apr 2019 11:55:42 +0200 Subject: [PATCH] Documentation of Git workflow --- README.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/README.md b/README.md index 836ec401..a45feedc 100644 --- a/README.md +++ b/README.md @@ -28,3 +28,38 @@ see: https://confluence.jetbrains.com/display/IDEADEV/IDEA+Coverage+Runner Either apply it to specific test configurations or, better, delete the previous test configurations and amend the JUnit template. + +== Git Workflow + +The jhipster-generated git branch tracks the history of the JDL model file +and the generated source code. The project has to be resetted to a clean state +(without any generated entitites) before changes to the JDL file can be imported. + + # Prepare/Cleanup Workspace + + git checkout jhipster-generated + git reset --hard jdl-base + git clean -f -d + git checkout HEAD@{1} src/main/jdl/customer.jdl + git reset HEAD . + + # Apply changes to the jdl file + + # Invoke JHipster generator + + jhipster import-jdl src/main/jdl/customer.jdl --force + + # Let Git determine change set between most recent commit and the re-generated source + + git reset --soft HEAD@{1} + git reset HEAD . + git add . + + # Commit changeset + + git commit -m '...' + + # Merge changeset into master branch + + git checkout master + git merge jhipster-generated