Source Control - 2023.2 English

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

Document ID
Release Date
2023.2 English

Source Control or Version Control technique is widely used in 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 show up 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>

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 will automatically create 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.