Source Control - 2024.1 English

Vitis Unified Software Platform Documentation: Application Acceleration Development (UG1393)

Document ID
UG1393
Release Date
2024-07-03
Version
2024.1 English

Source Control or Version Control techniques are widely used in the software development flow. This chapter describes how to use the Git integration in Vitis unified IDE .

Source Control

To enable the Source Control view, you must initialize your empty workspace as a git repository. After creating an empty workspace, and launching the Vitis Unified IDE to open the workspace, you can add it to your git repository using the following steps:

  1. From the Terminal menu, select New Terminal. The terminal is opened by default to the folder that is your workspace.
  2. In the Terminal window, type in the command git init and press Enter.

You should see a message such as: Initialized empty Git repository in /tests/temp/workVADD/.git/.

Important: Using the Source Control view with Git requires you to have a User ID and Password established, and provided to the system.

After you create a new component or project in the workspace, Vitis Unified IDE generates a .gitignore file. The .gitignore file can help you filter out the generated files so that it is easier to pick the files for source control. You can open the .gitignore file and edit this file if you have additional requirements.

The Source Control view is a GUI helper for Git. You can use Git commands and the source control view simultaneously for your project. Updates in the command line are displayed in the source control view and vice versa.

Add New File for Source Control

To add a file for source control, you can do the following:

Right click the file you want to add and select + Stage Changes

This GUI is equivalent to the following git command.

git add <file name>

Add Components for Source Control

  1. Switch to Source Control view
  2. Switch to view as tree

  3. Right click the component you want to add for source control and select + Stage Changes. This action will add all the files for this component to do source control.

  4. Right click the component and select - Unstage changes

This GUI is equivalent to the following git command.

git add platform/
Note: User need to select the components bound with system project together if the want to add system project for source control.

Commit the Changes

To commit the change, you can do either of the following:

Input the commit message and Press Ctrl + Enter after you select the git view.

This GUI is equivalent to the following git command:

git commit -m <commit message>

Push the Project to the Remote Repository

To push to your remote repository, you can do either of the following:

git push --set-upstream origin master

  • origin: this is the remote repo address
  • master: this is the branch of your local workspace coed version.
    git push https://your_repo/vitis_project master
Note: The first time you execute git init, it automatically creates a branch named master. You can use git branch <branch name> to create a new branch.

You can find your local project is in the remote repository.