To be able to store your projects, you need to create both remote and local GIT repositories.
Here we deal with creating a local repository. Here you can learn how to create a remote one.
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.
Step 1 |
Choose the Window menu group of the LyciaStudio menu bar and go to Preferences:
|
Step 2 |
Go to Team → Git → Configuration in the opened window:
|
Step 3 |
Press Add Entry ... to add user's name and email:
|
Step 4 |
Add the configuration entry by specifying necessary keys and setting values:
After the entry was added, you'll see the user's name and email in the GIT user settings tab:
|
Step 5 |
Press Ok to finish GIT configuration at this step:
|
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.
Step 1 |
Right-click the 4gl project and go to Team → Share project:
The project you use here must be disconnected from any other repository.
|
Step 2 |
Choose Git among the available plug-ins and press Next:
|
Configure the future repository (see details below):
After you finished configuring the repository, you get the added folder shown in the table as a Target Location:
|
|
Step 4 |
When you press Finish, your local GIT repository is created (you can see it in the project explorer):
|
At Step 3, you have to configure your future repository.
To be able to work with your local GIT repository, you have to initialize its structure.
Now your local GIT repository was created and its structure was initialized, you can start committing your projects to it.
Please, 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, follow these steps.
Step 1 |
Open the GIT perspective as described here.
|
Step 2 |
Press the Create a new GIT repository button of the GIT repository toolbar:
|
Step 3 |
To create a folder which will serve as your local repository, you click Create and determine the directory by direct typing or browsing:
|
Step 4 |
When you press Finish, your local GIT repository is created (you can see it in the repositories explorer):
|
To initialize the repository structure, follow these steps.
Step 1 |
Right-click the necessary repository and go to Init Git Flow:
|
Step 2 |
Press Yes in the message window that opens in order to initialize the repository:
|
Step 3 |
Choose the names for the branches of your local repository:
Some explanations for the default GIT structure were provided above ↑ .
|
Step 4 |
When you press Ok, the structure of your local GIT repository is initialized (you can see it in the repositories explorer):
|