Visual Builder

Get Involved. Join the Conversation.

Topic

    Luc Bors
    VBCS - DEVCS GIT Workflow is not working as expectedAnswered
    Topic posted January 17, 2019 by Luc BorsRed Ribbon: 250+ Points, tagged Git 
    178 Views, 5 Comments
    Title:
    VBCS - DEVCS GIT Workflow is not working as expected
    Content:

    Hi, 

    Version: 18.4.1
    Build Number: 3b79752de7920b5519c11402ffb8cea8f2652234 (2018-12-10 22:05:59)
    Runtime Version: 18.4.1.7
    JET runtime version: v5.2.2

    I started describing the use of GIT in VBCS and encountered an interesting 'issue'. Here is what I do:

    1) Create branch "develop" in DEVCS

    2) Configure DEVCS credentials in VBCS

    3) Link DEVCS repository in VBCS (pointing to branch "develop")

    4) Pull from GIT in VBCS

    5) Create branch "feature-1" from "develop" in DEVCS

    6) Change link in VBCS to point to "feature-1"

    7) Pull from GIT in VBCS

    8) Change something in VBCS (for instance an app string in  app-strings.json)

    9) Push to GIT in VBCS (push is successful)

    10) Find in DEVCS that the change is in branch "feature-1"

    11) Switch in VBCS to branch "develop"

    12) Do a pull from GIT (Make sure that the pull actually comes from "develop")

    13) See in VBCS that a conflict has occurred in the app-strings.json

    2 Questions:

    1) How can this happen since I pushed and next switched to another branch in VBCS?

    2) How can I resolve conflicts in VBCS?

    Also, somehow I was able to push a change from VBCS to 2 branches at the same time... No clue how that could happen, but it looked really bad... even though it happened just once.... Is this a bug that you are aware of?

    Thanks for you help.

    Luc

    Best Comment

    Jacob Danner

    Hi Luc,
    Yes, every developer has a 1:1 between VBCS Application <-> Git Repo/Branch. With each developer having there own VBCS application they can push and pull based on there own changes similar to how a developer would work with a local git clone. For complex merges/changes/long lived branches we use DevCS Merge Requests from the VBCS Branch to the MAIN/PROD branches. Again, YMMV but I hope this helps.
    -jacobd

    Comment

     

    • Jacob Danner

      Hi Luc,
      It's recommended that if you change git branches in your VBCS application that you RESET to HEAD before you perform any git operations. This is a destructive operation of course and it's important to know that any pending changes will be lost so push to your original git branch before you change branches.

      Another (and my preferred) option is to simply create another VBCS application for working with a different branch. My convention is <AppName>_<repoName>_<branch> but YMMV.

      For some technical background, when you change the git branch in VBCS, it does NOT update the VBCS source to match so when you pull you are running something akin to git pull <newBranch>.

      HTH,
      -jacobd

      • Luc Bors

        Jocab,

        thanks for your reply. When you say "Create another VBCS application for working with a different branch. My convention is <AppName>_<repoName>_<branch>" do you mean that every developer who is working on a feature-branch of the application simply does that by creating a new application (and deletes it once feature is complete)?

        How would you this work in a team of let's say 5 devs? Would they merge other peoples stuff (once it is done) into their own branch in DEVCS and continu working in VBCS in "their own branch' application" until their feature is done?

        Sounds plausible, once I can explain this to the team :-)

        Thanks 

    • Jacob Danner

      Hi Luc,
      Yes, every developer has a 1:1 between VBCS Application <-> Git Repo/Branch. With each developer having there own VBCS application they can push and pull based on there own changes similar to how a developer would work with a local git clone. For complex merges/changes/long lived branches we use DevCS Merge Requests from the VBCS Branch to the MAIN/PROD branches. Again, YMMV but I hope this helps.
      -jacobd

    • JP Subramanian

      I can see other developer's changes when i login to VBCS and open the application.

      How can each developer have their local copy of the application in VBCS? So, one does not commit changes from others.