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.
You can import a repository to SAP Web IDE from the repository information
When you create a repository on SAP Cloud Platform. The default branch (or working space) is called
master branch is a central repository that every developer can copy and work on moving forward.
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.
Imagine the pain of having 2 or more developers changing the same SAPUI5 control!
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.
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.
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.
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.
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.
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! 🙂