How to work with Git via Roxy-WI
Configuration files are valuable and dynamic. It is a good practice to store them in a version control system to track changes. The benefits of this practice include the following:
- The structure of your configuration file is preserved in the repository.
- You can establish reasonable default values for configuration options that remain consistent across development, testing, and production environments.
- You can store configurations for various use cases in a single location.
- You can easily track changes in your configuration files and roll back to previous versions if needed.
Roxy-WI allows you to interact with Git repositories through an intuitive graphical interface. This feature is particularly beneficial for users with limited command-line experience who require a visual representation. Advanced users will also appreciate this functionality, as it helps save time and automate Git operations.
To begin using Git, go to the Admin area => Backup => Git section and click Add git job. You will see the following form appear:
The form includes the following fields:
- Server — the server where the configuration to be pushed is located;
- Service — the service whose configuration should be pushed to Git;
- Period — the frequency of pushing, with options for daily, weekly, or monthly;
- Init a new repository — should be selected if you have not initialized the repository in the folder containing the configuration files;
- Repository — the address of the repository;
- Branch name — the branch in the repository to which the configuration should be pushed;
- Credentials for a git user — user credentials for authentication in the repository;
- Description — any additional information you wish to provide.
Make sure to add your public key to Git to enable SSH authentication.
If the configuration files are stored in a new folder where the repository has not yet been initialized, check the Init a new repository box. When you click Add git job, the necessary commands to initialize the repository (i.e., git init and git add remote) will be executed automatically.
If you are pushing configurations to an existing repository, specify the branch name in the designated field.