To be able to store your projects, you need to create both remote and local GIT repositories.
In this page, we deal with creating local repositories.
You can learn how to create a remote repository here.
GIT repositories are intended to secure a successful team work.
To be able to trace any commits to their authors, you have to set the user's name on every working station:
GIT user settings are saved to the .gitconfig file stored in your repository folder.
Local GIT repositories can be created in two ways - from the 4GL perspective and from the GIT perspective.
To create a local GIT repository from the 4GL perspective, choose a 4gl project which will serve as a temporary anchor for your local GIT repository.
Even though all the actions described below seem to be conducted on and for a definite project, they end up in creating the local repository but not committing to it.
To learn how to commit to your local repository, refer here.
After you configured the repository, you get the added folder shown in the table as a Target Location:
At Step 3, you have to configure your future repository.
In theory, your local repository can be created in any folder including the workspace.
However, with Eclipse, it is forbidden to create repositories in the workspace so, when checking the checkbox, you get this warning:
To choose or create the folder, you click Create and determine the directory by direct typing or browsing:
After the repository folder was created, you can add sub-folders to it:
To be able to work with your local GIT repository, you have to initialize its structure.
Here we use the default structure for our example local repository:
You can keep on with this structure or create you own structure which will better suit your development tasks and teamwork needs.
Now your local GIT repository was created and its structure was initialized, you can start committing your projects to it.
Do not forget that after you have performed these steps, your repository is still empty and the project you have used as a temporary anchor is not added to it.
Here is what you get after initializing the repository structure:
Here is what you get when the 4gl project was added to the repository:
You can also create a new local GIT repository from the GIT perspective:
To create a new local GIT repository, please follow these steps.
To initialize the repository structure, please follow these steps.
We talked about the default GIT structure here.