- 28 Mar 2024
-
DarkLight
-
PDF
Git Integration for Projects
- Updated on 28 Mar 2024
-
DarkLight
-
PDF
Projects within IAP can be connected to a Git Repository. The primary objective of this feature is to provide a version controlled space to manage, track and store file changes in a Project. Storing a file within Git enables a user to promote a Project between environments using their own pipelines.
See also User Settings for Projects.
Initialize a New Repository
From the Projects homepage, click New Project +.
Figure 1: Projects Homepage
Hover over the Git icon in the top toolbar and select Initialize a New Repository from the dropdown menu.
Figure 2: Initialize a New Repository
A dialog will open to input the following required information:
- Remote connection (access tokens are found in the user settings)
- Repository path
- Branch name
- Path to a project.json file.
Once the connection is located, or a path is entered, click Initialize and Push to establish the Git connection.
Figure 3: Initialize and Push
A success banner will appear (upper-right corner) to inform the user if the Project was successfully initialized.
Figure 4: Success Confirmation
Connect to an Existing Repository
From the Projects homepage, open an existing Project by clicking the desired card.
From the top toolbar on the left, hover over the Git icon and click Connect to Existing Repository.
Figure 5: Connect to Existing Repository
A dialog will then display where users can select the Remote Connection that has already been saved, or manually enter the settings to make a new connection.
Once all modifications to the connection settings are finalized, click Connect to make the connection to the chosen repository.
Figure 6: Existing Repository Path Options
A confirmation dialog then displays with the options to Pull Update, Push Changes, or Dismiss the modifications.
Figure 7: Pull Update or Push Changes
Pull Update
From the Projects homepage, open a Project and then hover over the Git icon in the top toolbar.
Click Pull Update.
Figure 8: Pull Update
A dialog will then display with a warning to confirm that pulling the latest update for the Project will overwrite all local changes. Click the Pull Update button to continue.
Figure 9: Confirm Pull Update
Push Changes
From the Projects homepage, open a Project and then hover over the Git icon in the top toolbar.
Click Push Changes.
Figure 10: Push Changes
A Generate Push for Project dialog will then open that shows the following information:
- Locations where the changes are being pushed to (Branch and Project).
- If a different branch is needed, click Change Target Branch to open the settings dialog. More information on changing the target branch (destination) is provided in the next section.
- A text box to enter a Commit Message for the push.
- A Project Version Change that shows the Current Version of the push and the new Publish to Version number.
- A Publishing Version and Current Version table, respectively, that displays the version number, a commit message, author of the push, and the destination branch.
Figure 11: Version Table
Change Target Branch
When you click the Change Target Branch button to push a Project, you can select a new branch from the branches that are currently connected, or manually enter a path to the new branch.
After changing the destination branch, type a commit message to explain what change you made and click Push.
Figure 12: Change Target Branch
Synchronizing a Branch
Sync icons will only be displayed if the local Project is out of sync with the Git repository. The sync icon is displayed next to the Branch name in the side panel, so the user is able to see the version of their local copy versus the version for the repository. Hovering over the icon will display the version information.
Figure 13: Sync Icon
If a user tries to push an update and the target branch is out of sync, a warning will display. If the user continues, the target branch will be overwritten with the update that is pushed.
Figure 14: Sync Warning
Make sure you are in sync with the remote branch before you begin working. If another user updates the branch while you are working, your push will overwrite the work they have done. Pulling will overwite your local project and Pushing will overwrite the remote project.
Manage Branch
From the Projects homepage, open a Project and then hover over the Git icon in the top toolbar.
Click Manage Branch.
Figure 15: Manage Branch
From the dialog that opens, you can select to a branch from the dropdown, or manually enter a name to create a new branch.
Click Confirm to connect to the repository.
Figure 16: Manage Branch Confirm
Project Version History
From the Projects homepage, open a Project and then hover over the Git icon in the top toolbar.
Click Project Version History.
Figure 17: Project Version History
A dialog displays that shows the current branch being worked on as well as a table showing the history of version changes and the commit messages made to the Project.
Figure 18: Version History Table
Remove Git Configuration
From the Projects homepage, open a Project and then hover over the Git icon in the top toolbar.
Click Remove Git Configuration.
Figure 19: Remove Git Configuration
A warning dialog displys to alert the user that the Git configuration for the Project is about to be removed. If the configuration is removed, the project will need to be re-initialized for it to be shared on Git.
Click Continue to delete the Git connection.
Figure 20: Remove Git Configuration Confirmation
Clone Remote Project
Click Clone Remote Project from the Projects homepage. A dialog will open for you to input the following:
- Remote connection
- Repository path
- Branch name
- Path to a project.json file.
Click Clone Project. If the clone is successful, a success banner will display in the upper-right corner and the cloned project will now appear in the list of projects on the Project homepage.
Figure 21: Clone Project Connection