SAPUI5 Git Flow

Today I’ll be sharing how a simple SAPUI5 Git Flow implementation can help you organize your development process.

Have you ever encountered developing a project and forgot to save the initial state? Not having a way to rollback and save a snapshot of the clean working copy? If yes, then you’re not alone. 🙂

Today, I will share to you a simple system we follow that you can easily setup to jump start on your SAPUI5 project.

SAP Cloud Platform Repository

SAP cloud platform comes with a built-in repository that you can use on your SAPUI5 projects, for best practices you can check my post about best practices I and II. Repositories created on cloud platform can be imported to SAP Web IDE for quick setup.

SAP Cloud Platform Git Repository
SAP Cloud Platform Git Repository
Repository Information
Repository Information

You can import a repository to SAP Web IDE from the repository information

Import to Web IDE
Import to Web IDE

Master Branch

When you create a repository on SAP Cloud Platform. The default branch (or working space) is called master. The master branch is a central repository that every developer can copy and work on moving forward.

Master Branch on Web IDE
Master Branch on Web IDE

Out of the box, you can we can use this branch to do all the development. But It will be hard to manage upcoming changes and merge all incoming changes from different developers.

Master Branch
Master Branch

Imagine the pain of having 2 or more developers changing the same SAPUI5 control!

Git Flow

As proposed by Vincent Driessen in 2010. We can create introduce another branch, a.k.a development or dev. Technically, you can name this branch any name you want, but we’ll stick to development for now.

Create Remote Branch
Create Remote Branch
Reference Master to Dev
Reference Master to Dev

After creating the remote branch, reference it in your local branch. This will point the local changes to go to this branch upon submission to the server.

Create Local Branch
Create Local Branch
Reference Remote to Local
Reference Remote to Local

The purpose of development is to separate non-production ready changes or features from the master branch. Moving forward, the master branch will contain only the production copy of our application.

This enable us to continue development and enhancements without breaking the stable version of our application.

Development Branch
Development Branch

Bringing Changes Back

After an enhancement has passed all the testing, and has been moved to production, we need to bring back the changes on the development to our master branch.

Merge Dev to Master
Merge Dev to Master

Take note that you must be on the master branch, then merge your changes from the development.

This will sync the master branch as production copy. The new enhancement can continue on the development without disruption.

Merging Branch
Merging Branch

Conclusion

We can actually go deeper and create several feature branch if needed to isolate changes and keep stable source code if we want. The mentioned approach above are just guidelines to start with, but you can implement your own style if needed by the project.

How about you? how do you implement your Git Flow? Do you think this simple flow can work for you? or do you have other flow you follow on your organization?

Don’t forget to like, share and subscribe! 🙂


Leave a Reply

2 thoughts on “SAPUI5 Git Flow

  1. sirgliofrei Reply

    Hi! Do you use Twitter? I’d like to follow you if that would be okay. I’m definitely enjoying your blog and look forward to new posts.

    1. Ginwene Rueda Reply

      I do have Twitter, but I’m not active on it. Sorry hehe

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.