You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This is an attempt to show how we can work on new features in its own app version or even on a different Joget server by making use of GIT.

Beware that there are GIT commands used in this article, so, make sure that you are comfortable working around GIT.

This is so each feature development would be carried out without the influence of another feature being developed at the same time.

In this example, we have a "Meeting" app and the table below describes works to be carried out. 

App VersionDescription
1Modify request form.
2Add calendar menu to the app.


Figure 1: Completed work on app version 1

Figure 2: Completed work on app version 2

When all features are developed and tested in v1 and v2, we are now ready to merge them. To preserve the work already done, we will clone v2 into a new copy, v3. Then we will attempt to perform the merging in v3 itself.

As shown in figure 2 below, bring up the "App Configuration Management" screen, select version 2, and click on "New Version".

Figure 3: Clone app version 2 into 3

Once the version is created, navigate to the newly created version ( i.e. wflow/app_arc/meeting/meeting_3 ) from your command line. We are going to merge v1 and v3 through GIT commands below.

Figure 4: Merge app version 1 and 3 using GIT


git remote add v1 ../meeting_1
git fetch v1
git merge v1/meeting_1 meeting_3 --allow-unrelated-histories

Once we have merged them, if there are any conflicts, we will need to resolve them. In the figure shown below, we can see that there are 4 conflicted files.

Figure 5: Resolving Conflicts 

In this case, we are making use of Visual Studio Code to inspecting the conflicted files and resolve them.

Figure 6: Resolving Conflicts using Visual Studio Code

To adopt changes coming from v1, we choose "Accept Incoming Change". And for changes made in v2, we choose "Accept Current Change".

Once all conflicts are resolved, we can then commit merge.

Figure 7: Commit Merge

Going back to the Joget screen, navigate to "App Configuration Management" > "Git Configuration", turn on "Auto Sync DB from GIT" as shown in the figure below.

Figure 8: Turn on Auto Sync DB from GIT

Click anywhere on the screen (i.e. navigate to "Properties & Export" or open any builder of this app) to trigger the sync.

INFO  16 Jun 2021 17:43:34 org.joget.apps.app.service.AppDevUtil  - Change detected (Wed Jun 16 17:41:57 MYT 2021 vs Wed Jun 16 17:22:07 MYT 2021), init sync for app {id=meeting, version=3, published=false}
INFO  16 Jun 2021 17:43:35 org.joget.apps.app.service.AppDevUtil  - Sync complete for app {id=meeting, version=3, published=false}
INFO  16 Jun 2021 17:43:35 org.joget.apps.app.service.AppDevUtil  - Commit to Git repo by admin: Update app definition meeting. _Update app config meeting. _

We can check the server log for sync completion. Once it is done, we can then inspect the app again to make sure that everything in v1 and v2 is merged properly in v3.

Figure 9: Verify changes from version 1 and 2 in-app version 3.

If verification / testing of app version 3 fails or not satisfactory, we can restart the whole process again. Delete version 3 from "App Configuration Management". Then, delete the "meeting_3" folder from "app_src/meeting" as well for good measures.

To summarize, these are the steps:-

  1. Clone v2 into a new copy, v3 using "App Configuration Management".
  2. Using CLI, navigate to app_src/meeting/meeting_3. Execute the following commands to merge works from v1 and v2 inside v3.

    git remote add v1 ../meeting_1
    git fetch v1
    git merge v1/meeting_1 meeting_3 --allow-unrelated-histories

    Resolve conflicts and commit.

  3. Navigate to "App Configuration Management" > "Git Configuration", turn on "Auto Sync DB from GIT". Click anywhere to start sync and observe server log for completion.
  4. Verify changes made in version 3.















  • No labels