- How to share a WINDEV/WEBDEV or WINDEV Mobile project via Git?
- Preparing the project
- Working on the project
Share your projects via Git
Git is a source code manager.
Git can be used within a company on its own servers, without anyone outside having access to it.
GitHub is a hosting company that offers Git database hosting (it is the most well-known hosting company, now owned by Microsoft).
From version 25, the environment allows saving projects, windows, pages, reports, classes, sets of procedure and code in a Git database.
This new feature allows you to share source elements through GitHub, for example.
Caution: This documentation only describes how to share projects via Git with WINDEV, WEBDEV and WINDEV Mobile . The reader is supposed to know and master Git beforehand. This help page does not describe how to use Git. for more details on Git, please refer to their documentation.
How to share a WINDEV/WEBDEV or WINDEV Mobile project via Git?
To share a WINDEV, WEBDEV or WINDEV Mobile project via Git, this project must not be in the SCM.
Preparing the project
To share a WINDEV, WEBDEV or WINDEV Mobile project via Git:
- Open your project in the corresponding product.
- Change the save format of all project elements:
- Display the description window of project: on the "Project" pane, in the "Project" group, click "Description".
- In the "Options" tab of the project description window, for "Default format for saving elements", select "Text (pre-release)".
This option allows you to change the format of all project elements to text, a format compatible with Git.
- For each element of your project, you can check or change the save format via the "Format" option in the element description window.
- The extensions of your elements do not change. Only the format of the content changes.
- Only the code of the elements is in text format. The characteristics of windows, controls, ... remain in binary format.
- To ignore project-specific files (compilation files, etc.), copy the ".gitignore" file to your project directory. ".gitignore" is located in the "Personal" subdirectory of the WINDEV, WEBDEV or WINDEV Mobile setup directory.
- Close your project.
A Git repository can be created for the project.
Working on the project
You can work on a shared project via Git with WINDEV, WEBDEV or WINDEV Mobile as usual. You can modify:
- an element saved in text mode (window, report, etc.).
- an element saved in binary mode (project).
It is recommended to retrieve the latest version of the project and its elements before making any changes..
1. Modifying an element available in text format (window, etc.)
The modification is made in the project opened in WINDEV, WEBDEV or WINDEV Mobile. The text file corresponding to the element consists of two parts:
- A "readable" text part: this part corresponds to the code of the elements.
- A "binary" text part: this part corresponds to all the other characteristics of the element.
When the element is modified in the project, it is then possible to make a "commit" and then a "push" on the "repository" with your usual Git tools. Two cases may occur:
- most common: the element has been modified by only one person. No specific action required.
- the element has been modified by several people:
- the changes do not apply to the same element. No specific action required. Simply re-open the element in the editor to retrieve the changes made.
- the changes apply to the same element: a "merge" must be performed (if necessary with one of your Git tools).
- If these changes apply to the text part of the element, simply choose the changes to keep.
- If these changes apply to the binary part of the element, it is recommended to compare both versions of the element in WINDEV, WEBDEV or WINDEV Mobile (in the "Project" pane, in the "Other actions" group, expand "Compare" and select "Compare two elements".
2. Modifying the project
Several actions can modify the project:
- adding or deleting elements, etc.
To retrieve the project ("pull"), you can do one of the following actions:
- close the project in WINDEV, WEBDEV, WINDEV Mobile. In this case, the project and all its elements are freed. You can pull the project. When the project is re-opened, the project changes will be taken into account.
- keep the project open. In this case, the project and its elements are "freed" in order to be pulled.
- In the "Home" pane, in the "General" group, expand "Close" and select "Close all temporarily (<Git<)" shortcut: Ctrl + Alt + G).
- A window appears to indicate that the project has been temporarily closed. Keep this information window open.
- Make the desired changes with your Git management tools.
- Once the changes have been made, click "Reopen project" in the information window.
- The project is updated with the changes.
This page is also available for…