Skip to content Skip to footer

Servoy Tutorial: Using Git Flow and SourceTree

Servoy Tutorial Photo Credit:
Christopher J. Morley via Compfight

This is a Servoy Tutorial on how to use Git, Git Flow, and Atlassian SourceTree (GUI for Git Flow) with Servoy. In this Servoy tutorial I present the Git Flow model that is working well for me on all my big projects. I also explain how to setup Git Flow with Servoy, and even include a video demonstrating how to do some basic branching.  It should be enough to get you started.

Using a repository for source code control is imperative, regardless if you are a lone developer, a small team of developers, or a big team. Without it, you are in big trouble; its only a matter of time before you loose it all due to a hard drive failure or other disaster.

I’m not going to get into a debate with anyone over the pros and cons of Git versus centralized source code control systems like subversion or svn. There are plenty of flame wars on this topic already underway on the web. The bottom-line for me, is that Git is designed for branching, where as for other centralized systems like svn, it is an advanced topic and considered a bit scary (“watch out for merge conflicts…”). With Git, branching is extremely easy and part of my everyday workflow. I can create feature branches, hot fix branches, release branches, collapse branches, all without fear, and with minimal effort. I will never go back to a centralized system like svn, and any client I work with, will be lectured on the importance of switching to Git. Yes…I feel that strongly about it.

With Git there is a central repository (repo) called origin. Each developer then has a local copy of origin that they use to make their changes in. When they finish making changes, they can push those changes up to origin. Other developers can then pull those changes down to their local repository. Developers can also push and pull to/from each other, if they want to test something before pushing to origin.

At the core, the Git Flow model has two main branches at origin:

  • master (called production in image)
  • develop (called development in image)

GitWorkFlow

The origin/master is the branch that is our production ready state. It is the code we have stabilized and is being deployed for our customers.

The origin/develop branch contains everyone’s latest development changes that have been pushed up from their local repositories. This is also where nightly builds are made.

There are several supporting branches that are used in Git Flow in addition to the master and development branches. They include:

  • Release branches
  • Hot fix branches
  • Feature branches

Technically, these additional branches all function the same way. The only real important factor is where they are originate from, and where they merge when closed, which is all handled by Git Flow (think of Git Flow as the Git workflow).

When the code in the development branch reaches a stable point, a release branch can be made using the Git Flow button in SourceTree. This will create a new release branch from development, isolating the code into a new release branch, where it will be stabilized until it is ready to be released into production. A build is prepared from the release branch and installed on QA servers, so that testing can begin. If any fixes are needed, developers can easily switch from their development branch to the release branch, fix the issue, make a new pre-release build, and deploy it for QA. This is really where the Git repo system begins to shine.

Git_workflow

The QA testing and fixing on the pre-release branch continues until a point where it is now ready to go to production. At that point, Git Flow is used to close the release branch and merge it into the production and development branches, ensuring that all changes made in the release branch, are merged back into both. Once merged into production, a build is prepared for distribution to all production servers.

At any point in time, if a critical issue is detected in production, a hot fix branch can be made using Git Flow. Developers can easily switch to the hot fix branch, resolve the issue, and then merge it back into production and development.

Feature branches are made off of development, and allow developers to work on significant and large features, thereby isolating that work. The release timeline for the feature may well be unknown, and if an experiment that ends in disaster, does not affect any other work in the development branch, and can simply be discarded. After a feature has been fully developed, it can be collapsed back into the main development branch.

There is no limit to the number of feature branches that can be open at one time. This lends itself really well to an agile development environment, where developers constantly have to switch branches to work on new features as specifications are gathered that are required for work to proceed.

By isolating these features off of the main development branch, the team is still able to cut a release at any time, and not worry about the effects an unfinished feature may have on a new release.

There is really nothing unique about this branching model outlined here; it is simply the Git Flow built into SourceTree, and it works really well with Servoy and the needs of today’s agile development teams. More importantly, with Git Flow, the branching strategy forms an elegant model that is easy to comprehend and allows all the team members to move forward with confidence in a unified branching and release process.

Git Flow is where its at, and SourceTree is the tool to use. Let’s set it up and get to work!

Here are the Servoy tutorial steps to setup Git and SourceTree with Servoy.

  1. Download and install Git.
  2. Download and install SourceTree.
  3. Install EGit in Servoy Developer (Eclipse). Install Mylyn at the same time (you should be using this for tracking code context on tasks regardless if you are using Git or not; see TaskTop for more info).
    Git_Eclipse_Indigo
  4. Prepare a new workspace folder for your Servoy project.
  5. Go to bitbucket.org and get yourself a free repository.
  6. Open SourceTree.
  7. Click Clone/New and add your repository using the “Clone Repository” tab. Point the directory at your new Servoy workspace, which should be empty right now.
    git_1
  8. Add a simple text file to the Servoy workspace. You will see an “Uncommitted Change” in SourceTree
  9. Click the “Commit” button, and you will get a dialog that looks like this:
    git_2
  10. Click the arrow to stage the changes.
  11. Click Push commits immediately to “origin”.
  12. Enter a commit message describing what you are committing (everyone will see this). Your finished commit dialog should look like this:
    git_3
  13. After your first commit, you should have a branch called “master”, and you should have been switched to it automatically. My view shows two commits, but you get the idea.
    git_4
  14. Next, click on “Git Flow” and verify that your branch names are acceptable. For example, you could call the “develop” branch “dev” if you wanted to.
    git_5
  15. Click “Ok” to initialize Git Flow. Git Flow will be initialized and you will be switched to the “develop” branch.
    git_6
  16. Next, setup your SourceTree to use your local installed Git, and setup a .gitignore_global exclusion file. This global exclusion file should be in the root of your new workspace folder; it will prevent certain files from being included by Git.
    git_14
  17. Here is what my exclusion file looks like:
    git_15
  18. Next, put your entire Servoy project (including the .metadata folder) into your new Servoy workspace.
    git_7
  19. In SourceTree, click on “Commit”. The commit dialog will appear and you will have lots of working copy changes.
  20. Click the double arrow to “Stage All” changes.
  21. Write a commit message.
  22. Check the “Push commits immediately to origin” checkbox. This will push your local commit up to the repo on bitbucket.
    git_8
  23. Click “Commit”.
  24. When the commit is done, SourceTree should look something like this:
    git_9
  25. Now launch Servoy and open the new workspace you just created for Git.
  26. Add the Git perspective to your views.
    git_10
  27. Click “Add an existing repository”, and browse to the new workspace you setup for Git.
    git_11
  28. Your perspective should now look like this:
    git_12
  29. Make sure the Navigator view is added to your main Servoy perspective. When you switch branches in SourceTree, you will need to use this view to highlight all your modules, right-mouse click and refresh. This ensures that your searches, for example, do not thrown any errors because files are out of sync. Also, when you have multiple branches available, Servoy will show you what branch you are currently on.
    git_13
  30. The next step is to share all your projects with the team. Highlight everything you see in the navigator, right-mouse click, select “Team: Share Project”.
  31. Select Git as the repo to share with.
    git_16
  32. Setup your Share Project dialog something like this:
    git_17
  33. Your navigator view should now look like this:
    git_18
  34. When you switch to a new branch in SourceTree, your navigator will show the new branch you are on. Basically, the files in the workspace that Servoy is working with, are swapped out with new copies from the branch you switched to.
    git_19
  35. You are done setting up Servoy/Eclipse, Git, Git Flow, and SourceTree. Begin development.

The following video will demonstrate how to work with GitFlow in SourceTree, and do basic branch switching. I think watching it in use, as opposed to a written description, makes more sense for this Servoy tutorial.

 

 

Well, there you have it; how to setup Servoy/Eclipse, Git, Git Flow and SourceTree. As I said at the start, Git Flow is so much easier to work with then svn or subversion (in my opinion), and it does a much better job in allowing you to switch branches, something that is a frequent occurrence throughout the day in our fast paced agile environments. Give it a try now; once you do, I know you will convinced, and never go back.

That concludes this Servoy tutorial. I hope you found it helpful.

3 Comments

  • Dean Westover
    Posted December 30, 2013 at 4:37 pm

    SourceTree appears to require a Windows 2007 or higher operating system for all Windows installs (ie. not for those who still have Windows XP or Server 2003 requirements). Another reason to update old equipment!

    • Post Author
      Gary Dotzlaw
      Posted December 30, 2013 at 10:07 pm

      I’m not surprised; Windows 7 has been out for sometime now. I can highly recommend Windows 7; very stable and works great with all apps. I would still stay away from Windows 8.

  • Denny
    Posted July 11, 2014 at 3:50 pm

    Thank you, this is really useful.

Leave a comment

OUR SERVICES

AI Integration and Agent Development

We design, prototype, and deploy AI agents that streamline operations and enhance decision-making. Our expertise includes:

  • Custom AI Agent Development: Crafting autonomous systems using tools like n8n, Flowise, and PydanticAI.
  • Workflow Automation: Reducing operational inefficiencies through scalable, automated solutions.
  • Machine Learning Integration: Building predictive models to uncover actionable insights.
  • AI Adoption Consulting: Guiding businesses through the process of integrating AI technologies to achieve their strategic goals.

Expert Prompt Engineering

Effective prompts unlock the full potential of AI systems. We specialize in:

  • Custom Prompt Design: Developing precise and context-aware inputs to guide AI systems effectively.
  • Advanced Prompt Patterns: Using techniques like persona-based prompts, two-shot prompting, and reflection prompts for superior outcomes.
  • Industry-Specific Solutions: Tailoring prompts to solve challenges in fields like finance, healthcare, retail, and more.

Data Solutions and Insights

Unlock the power of your data with our comprehensive solutions:

  • Data Mining and Analysis: Extracting valuable insights to drive informed business decisions.
  • Data Visualization: Creating clear and interactive dashboards for impactful storytelling.
  • Advanced SQL Expertise: Leveraging MS SQL and PostgreSQL to build robust, scalable database solutions.

AI-Powered Project Management

Managing complex AI projects from start to finish:

  • End-to-End Project Management: From initial strategy to deployment, ensuring seamless execution.
  • Cross-Functional Collaboration: Bridging technical and business teams to align project goals.
  • Strategic Planning: Delivering AI solutions that are on time, within budget, and aligned with business objectives.

Why Choose Dotzlaw Consulting?

With over 20 years of experience in AI, software development, and workflow optimization, we combine technical expertise with business insight to deliver transformative results. Let us help you unlock the full potential of AI to drive growth and innovation.

Ready to Get Started?

Let’s collaborate to achieve your goals. Contact us today to explore how AI can transform your business.


Our Skills:

[bra_graph_container]
[bra_graph Title=’Artificial Intelligence (AI) Consulting’ Percent=’95’]
[bra_graph Title=’Prompt Engineering’ Percent=’90’]
[bra_graph Title=’Workflow Automation’ Percent=’90’]
[bra_graph Title=’Python’ Percent=’90’]
[bra_graph Title=’SQL’ Percent=’85’]
[bra_graph Title=’Data Mining and Visualization’ Percent=’80’]
[bra_graph Title=’Machine Learning’ Percent=’80’]
[bra_graph Title=’Servoy’ Percent=’99’]
[/bra_graph_container]

Core AI and Consulting Skills

[bra_list style=’arrow-list’]

  • Artificial Intelligence (AI) Consulting: Delivering transformative AI solutions tailored to business challenges.
  • Machine Learning: Expertise in designing, training, and deploying machine learning models.
  • Generative AI Workflows: Optimizing workflows with generative AI technologies for scalability and efficiency.
  • Predictive Analytics: Leveraging data to forecast trends and improve decision-making.
  • Data Mining and Analysis: Uncovering actionable insights from complex datasets.

[/bra_list]

Workflow and System Modernization

[bra_list style=’arrow-list’]

  • Workflow Automation (n8n, Flowise): Automating processes with cutting-edge tools to streamline operations.
  • Legacy System Modernization: Upgrading outdated systems using modern frameworks and AI-driven approaches.
  • AI Agent Development: Prototyping and scaling AI agents from concept to production.
  • Scalable Workflow Design: Crafting workflows optimized for efficiency and growth.
  • Business Process Optimization: Transforming processes to improve productivity and reduce costs.

[/bra_list]

Technical Expertise

[bra_list style=’arrow-list’]

  • Python, Java, JavaScript Programming: Proficiency in versatile programming languages for AI and software development.
  • Expert Servoy Programmer: Advanced expertise in Servoy development for specialized client needs.
  • AI Agent Prototyping with n8n and Flowise: Rapid prototyping using state-of-the-art AI agent development tools.
  • AI Agent Scalable Production Solutions with PydanticAI: Delivering robust, production-ready AI solutions.
  • Advanced AI Prompt Engineering: Crafting high-performing prompts for generative AI applications.

[/bra_list]

[bra_button text=’Contact Us’ url=’https://dotzlaw.com/clone/contact-me’ target=’_self’ size=’medium’ style=’rounded’ color=’tealgreen’]