Skip to content

Latest commit

 

History

History
89 lines (50 loc) · 5.46 KB

File metadata and controls

89 lines (50 loc) · 5.46 KB

git-source-control Menu Items

Status

This menu option is analogous to the git status command and prints the status of the repository to the output.

Settings

This option opens the GUI's settings page project specific git-source-control settings can be configured. This includes the settings that were configured when running:

do ##class(SourceControl.Git.API).Configure()

This page also includes the mappings configurations.

Any changes made to the settings must be saved using the 'Save' button in order to take effect.

Launch Git UI

This menu option opens the git-source-control GUI. From here commit messages can be written, files can be staged and committed, branches can be viewed.

Add

This menu option is analogous to the git add command. It will perform 'git add' on the currently open file, adding it to the files that can be staged.

Remove

This menu option will only appear if the currently open file has been already added using the 'Add' menu option. It undoes the effect of adding the file, similar to running git reset on a specific file.

Push to Remote Branch

This option pushes the commits in the branch to the remote repository. This exhibits the same behavior as the git push command.

Push to Remote Branch (force)

This option forcibly pushes the commits in the branch to the remote repository. This is potentially destructive and may overwrite the commit history of the remote branch. This exhibits the same behavior as the git push --force command.

Fetch from Remote

This option first fetches the most recent version of the branch without merging that version into the local copy of the branch. It will then list all files modified between the current version and the remote version.

This also has the effect of refreshing the list of all remote branches and pruning any references that no longer exist in the remote. (see: git fetch --prune)

Pull Changes from Remote Branch

Much like the git pull command, this menu option pulls the most recent version of the current branch from a remote source, merging the changes into the local copy.

Sync

This option will synchronize the current branch checked out a local repo with the same branch in a remote repo. It encapsulates the pattern of fetching, pulling, committing, and pushing into one menu action.

  • If you are on the Default Merge Branch, then Sync only pulls the latest commits from the remote. Committing is disallowed on the Default Merge Branch.
  • If there is no defined remote repository, it will simply commit all staged files.
  • If there is a Default Merge Branch defined, then sync attempts to perform a rebase onto the latest Default Merge Branch from the remote.
    • If the rebase were to result in merge conflicts, then this action is aborted so the system is not left in an inconsistent state.

The sync operation is only enabled in basic mode.

Create New Branch

This menu option creates a new branch in the repository for changes to be committed to. It also changes the current branch to be the created branch. This mimics the behavior of the git checkout -b command.

In basic mode, this option first checks out the Default Merge Branch (if defined) and pulls that branch from the remote before creating the new branch.

Check Out an Existing Branch

This option refreshes the local list of branches available in the upstream repository, and then changes the currently checked out branch to the provided branch. This mimics the behavior of the git fetch --prune and git checkout commands.

If the desired branch does not exist in your local or in the remote, then you will receive the "Selected branch does not exist" error message.

Export System Default Settings

This option will export interoperability system default settings to the Git repository. Only system default settings marked as "deployable" will be exported. The Embedded Git settings must be configured with a mapping for items of type ESD to a location in the repository for system default settings to export.

Export All

This option exports class files to the local file tree at the configured location.

Export All (Force)

This option exports all class files regardless of whether they're already up to date in the local file tree or not.

Import All

This option imports the versions of the files that are found in the configured directory into the project. Files that are out of date or the same as the files in the project won't be imported.

Import All (Force)

This menu option behaves similarly to the regular import but forces the files to be imported regardless of whether the on-disk version is the same or older.

Take Ownership of Changes to File

This option is enabled if the current item has uncommitted changes owned by a different user. Take Ownership will transfer ownership of those uncommitted changes to the current user, allowing the current user to make their own edits.