Make Your Changes Public

When you edit files in your workspace, you're working within your local repository, which means that only you can see them. To share your private changes with your team, you'll need to push them to a shared project repository (the remote repo).

When you make changes in your workspace, an yellow dot appears next to the branch name in the header to let you know that you have uncommitted changes:
Description of git-header-badge.png follows
Description of the illustration git-header-badge.png

Saving your changes to a remote repo is a two-step process: commit and push.
  1. The first step you must perform is a commit. When you make a commit, you're basically grouping together the files in your local branch that you eventually want to move to the remote branch. You also provide a description of the changes you're making in the commit, which can be very helpful later if you need to track down which files were changed.

    For example, suppose you added a new dynamic layout to include a field. When you committed the changes, you added a commit message describing the update, "Added new layout X for field Y". You then added a rule for the new layout, using the commit message "Added rule Z for layout X". By reviewing the history for the repository (using the Git History tab at the bottom of the Designer), you can easily see what files were changed and the reasons for changing them:Description of githistory.png follows
    Description of the illustration githistory.png

  2. The second step is push, which synchronizes all the files you have committed thus far (since the last push) with the remote branch. If you have edited some files but haven't committed them, you'll be prompted to commit before you can push.

Note:

You can use the Publish action in the header if you want to commit, push, and merge the remote branch into the main branch in one operation. See Publish Your Extension. Don't use Publish if you're not ready to merge the remote branch into the main branch.

Commit Your Changes to the Local Branch

As you work on your application in the Designer, you can use the Commit option to save your changes to the local branch.

When you make a commit, you're basically grouping together the files in your local branch that you eventually want to copy to the remote branch. You also provide a description of the changes you're making in the commit, which can be very helpful later if you need to track down which files were changed.

Commit your changes as often as you can, so you have a string of commits with messages that clearly describe your updates.

To commit changes in your workspace:

  1. Open your workspace.
  2. Click the Git menu in the header or in the Git panel, and select Commit.

    VB Studio checks the status of your working branch and identifies files that have changed since your last commit.

  3. If you're not ready to commit some of your changes, scroll through the Items to Commit and deselect the files you don't want to commit.
  4. Enter a commit message that describes the changes you've made in the remaining files.
  5. Click Commit.

    When the commit is successful, close the confirmation message that appears.

Push Your Changes to the Remote Branch

Use the Push option to move changes you've committed from the local branch in your workspace to the remote branch, thus making your changes visible to team members. You'll need to explicitly commit your changes before you can push them to a remote branch.

Note:

Before you commit and push your changes, you should update the source files in your workspace by pulling the most recent versions from the repository. If the file versions in the remote branch are newer than the versions in your workspace, you’ll see a status message when attempting to push your changes that the push was rejected and that you should pull the most recent versions from the repository.

To push your commits from the local branch in your workspace to the remote branch:

  1. Click the Git menu in the header or in the Git panel.
  2. Select Push.

    If there are no changes to push, click Close. Otherwise:

    • To push committed changes to the remote branch, click Push Changes.
    • To commit all uncommitted changes, enter a commit message and click Commit All and Push. If you don’t want to commit uncommitted changes, but want to push previously committed changes to the remote branch, clear the Commit changes before pushing checkbox.

    When the push is successful, close the confirmation message that appears.

Pull Changes from the Remote Branch

Use the Pull option to update your workspace with commits from the remote branch.

Pulling the most recent changes from the repository is especially important when you and other team members work on an extension, to keep the source files in your workspace up-to-date with everybody's changes. It can help you avoid making changes to files that someone else is editing or has edited, which can result in a code conflict that you would then need to resolve.

To pull changes from a remote branch into your workspace:

  1. Click the Git menu in the header or in the Git panel.
  2. Select Pull.
  3. From the Remote Branch list in the Pull (Rebase) dialog box, choose the remote branch that has the content you want to pull to your workspace.
  4. If your working branch contains uncommitted changes, you have the option of committing those changes.
    • To commit your changes before pulling in content from the remote branch, enter a commit message (with the Commit changes before pulling checkbox selected).
    • To pull content without committing your changes, clear the Commit changes before pulling checkbox.
  5. If you chose to commit changes, click Commit All and Pull; otherwise, click Pull Changes.