Developing in OutSystems provides us with a platform that has built-in versioning and publishing capabilities. While this gives us a safety net for managing our code and rolling back changes, as front-end developers, we often need additional tools to manage our code effectively.
This is where Git comes in!
At first, you may think that Git cannot take advantage of OutSystems code, and while this is true, it is not a disadvantage when it comes to storing front-end code and other small resources. In fact, there are several advantages to using Git in conjunction with OutSystems:
As you can see, using Git repositories to control versioning and to keep track of every change that's made to our codebase, is not only a very good assistance tool but it’s almost something mandatory for making sure of the quality of our front-end projects.
Git allows you to save different versions and to revert to previous versions if necessary, and this is particularly useful when you have multiple people working on the same project.
One of the key features of Git is branching. This allows you to create a separate branch for each feature or change you make to your codebase, keeping everything organized and making it easier to track progress. For example, you could create a branch for a new feature, and when it's complete, merge it back into the main branch. This helps ensure that you don't overwrite any other changes that may have been made to the main branch, keeping everything organized and making it easier to track progress.
Scenario 1: Multiple Developers Working on the Same Project
In this scenario, various developers are working on the same project. They each create branches for the feature they are working on. This way, they can work on the code without affecting each other. When they are both done, they can merge their branches into the main code.
Scenario 2: Testing a New Feature
In this scenario, a developer is working on a new feature. Instead of making changes to the main code, the developer creates a branch for the feature. This allows the developer to test the feature without affecting the main code. If the feature does not work, the developer can simply delete the branch and start over.
Now that we have established the basis of git and how it can help with your project organization, we shall delve into another important aspect of Git: commit writing. A commit is essentially a snapshot of your codebase at a specific point in time. By writing clear and concise commit messages, you can easily see what changes have been made and why they were made. This makes it easier for other developers to understand your changes and helps ensure that everyone is working from the same codebase.
The basic structure of a Conventional Commit message is as follows:
Our tech lead is always hammering the importance of committing to every feature. To quote him: "You don't commit just at the end of the day, you should commit every time you add a feature". This highlights the importance of committing frequently, as it helps ensure that everyone is working from the same codebase and that changes are tracked and documented.
As we covered Git allows teams to track changes in their codebase, collaborate on projects, and maintain a work history. With proper commit practices, teams can stay organized and efficiently manage their codebase.
Here at Mediaweb we foster the use of good commit practices and use Conventional Commits as our commit structure, this way we can maintain a good commit structure, an organized git, and most importantly know what is happening in each of the projects we are working on.
Most of all, this proper commit practice aligns with Mediaweb’s values of Optimizing work processes and Striving for excellence as the lowest standard.