Work with Git from the Designer

Several common Git commands can be used directly from the Git menu in the Designer header or from the Options menu in the Git panel:

  • Switch Branch/Switch Sandbox

    Switch branches and optionally commit your changes to the branch you switch to, or create a new branch from the branch you are currently working in.

  • Add file(s)

    Select an untracked file and mark it for inclusion (add) in your next commit to the current branch. Once the file has been added, it'll move from the Untracked category to the Changed category. You can select and add multiple untracked files in one operation.

  • Save uncommitted files locally

    Temporarily stash changes you've made to your working copy when you're mid-way through a code change and aren't quite ready to commit. When you're ready to work on something you previously stashed, you can apply that stash to bring back your saved changes and pick up right where you left off.

    You can either apply a stash or pop it to your working branch:
    • When you apply a stash, its changes are restored and the stash remains in the stash list, so you can apply the same stash to multiple branches.
    • When you pop a stash, its changes are restored and it is removed from the stash list.

    When you no longer need a stash, you should delete it and keep your stash list clean. However, keep in mind that once you've deleted a stash, you can't recover it.

  • Rollback file

    Select a changed file and revert modifications made to the file since its last commit to the current branch. This option is available only for files with changes that have been committed to the branch. The option isn't available when your workspace is in an interrupted state, like when conflicts occur during Merge or Pull operations.

  • Commit

    Group changes that you've made and save them to the local repository. Can be used in tandem with the Push option, where you can commit your changes before pushing them to the remote repository as part of the push operation. You can also deselect any changed files that you do not want to commit or push.

  • Status

    Display the state of the working directory and the staging area. This option tells you which changes have been staged, which haven’t, and which files aren’t being tracked by Git.

  • Diff

    Compare two input data sets and output the changes (differences) between them. This option is often used with the Status option to analyze the current state of your Git repository.

  • Pull

    Download and integrate remote changes. The branch that the data is integrated into is always the currently checked out HEAD branch.

  • Push

    Publish new local commits on a remote server. The branch that the data is uploaded from is always the currently checked out HEAD branch.

    If you're working in a scratch repository, you can push your scratch repository's content to a new remote Git repository that VB Studio can create for you so other team members can work with your visual app.

  • Reset to HEAD

    Undo changes. Moves the HEAD ref pointer as well as the current branch ref pointer.

  • Merge

    Integrates changes from another branch. The branch that receives changes is always the currently checked out HEAD branch.

  • Rename a Branch

    Change your current branch's name, retain its history, and push the renamed branch to the remote repository. The current remote branch won't be renamed or deleted. If the renamed branch is local only, it will be renamed, but won't be automatically pushed to the remote repository.

  • Delete a Local Branch

    Delete local Git branches you no longer need, after you finish working on a branch and you've pushed your changes to a remote repository. If your local branch has uncommitted changes, you'll lose them after the branch is deleted so, before deleting the local branch, commit any changes you want to keep.

  • View Git history

    VB Studio keeps track of all the Git actions you perform in your workspace by logging them as action details. You can use the Git History panel to view your Git actions, see the results of each action, and keep track of what you've done in the workspace. Accessing this panel is useful for checking the sequence of recent actions and their details, especially when troubleshooting issues with version control. You can also filter the actions by various criteria (commit message, revision ID, branch name, action type, and so on) to quickly locate events and check details to understand its history.