Manage scripts with Git
This section describes how to work with a Git repository to store and retrieve your scripts
About working with Git
VuGen integrates with GitHub, allowing you to upload scripts from a Git repository and perform common actions such as Pull, Push and Track.
You can also take a local script and add it to a Git repository, directly from the Solution Explorer. Using the right-click menu, you can perform typical Git operations. You can also view history and manage your changes.
To limit the files added to your repository, VuGen uses a .gitignore file, which can be edited. For details, see Configure Ignore List dialog box.
For scripts stored in a Git repository, the Solution Explorer pane indicates which files changed since the last commit.
Work with scripts in Git
You can connect to a Git repository and work with Vuser scripts.
Note: You must use a personal access token (PAT) to connect to the GitHub server. You cannot use username/password authentication or other forms of authentication (for example, SAML single sign-on). For details on generating a PAT, see the GitHub documentation.
When entering your GitHub credentials in VuGen, enter your GitHub user name in the User name field and your PAT in the Password field.
To work with Vuser scripts in Git:
-
Open or create a Git repository script in VuGen
- For a local script not part of a Git Repository:
Create or open a local script in VuGen. Click the parent level of the script in the Solution Explorer and select Git > Create Local Git Repository. The Track Script dialog box opens. Accept the default gitignore content, or click Configure Ignore List to edit the list or use an external file. For details, see Configure Ignore List dialog box. After you edit the ignorelist, click Track. - For a script stored in a Git Repository: Download the script from the Git repository.
Select Version Control > Git Options > Import from Remote Repository. Specify the repository information and click Import. The script opens in the VuGen editor.
- For a local script not part of a Git Repository:
-
Edit the script
Edit or record the script as you would any other script.
-
Perform a Pull operation (optional)
Click the parent level of the script in the Solution Explorer and expand the Git entry from the right-click menu. Select Pull to retrieve the updated files from the Git repository. For details, see Git operations. If there are conflicts between the files, VuGen opens the Resolve Conflicts dialog box.
-
Commit the changes
Save the file in VuGen. Click the parent level of the script in the Solution Explorer and select Git > Commit… from the right-click menu. In the Commit Changes dialog box, specify the change's details and click Commit.
-
Push the changes to the Git repository
Click the parent level of the script in the Solution Explorer and expand the Git entry from the right-click menu. Select Push to send the changes to the Git repository. For details, see Git operations. If there are conflicts between the files, VuGen opens the Resolve Conflicts dialog box.
-
Track or untrack scripts (optional)
To disable tracking for a script, click its parent level in the Solution Explorer and select Git > Untrack Script. To re-enable tracking, select Git > Activate Script Tracking.
For additional options, such as undoing changes or viewing history, see Git operations.
Known issues
-
Push, pull, or import operations fail.
Resolution: Try the following:
-
Check there is an active Internet connection.
-
Check that a proxy server is not blocking the connection. Configure the Git machine to allow access using your proxy server. For details, see the Git documentation.
-
For Windows Server 2012, check that TLS 1.1 and TLS 1.2 are enabled on the server. See https://support.microsoft.com/en-gb/help/3140245/update-to-enable-tls-1-1-and-tls-1-2-as-default-secure-protocols-in-wi.
-
-
If you push to a remote repository, then change the connection to use a second remote repository and push the commits to that second repository, the push fails.
Resolution: Push to the new repository as follows:
- Change the connection to point to the second repository.
- Perform a new commit.
- Push to the new repository.
See also: