Common Version Control Operations
Classic+
Some operations are similar across all the supported version control systems. While there are some minor variations among these, the basic idea is the same and they perform within Wing in the same way as they would on the command line.
Commit copies changes in the local file system to the version control repository that the files are associated with. The repository might be entirely local in distributed systems such as Git or Mercurial, or it may be on a remote host in centralized systems such as Perforce.
The view shown for a commit operation has a several tabs that contain the commit message, the diffs for this commit, the list of files eligible for the commit, and the results once the commit is run. The Files tab may be used to select files for the commit by un-checking files that should not be committed.
When committing with Git or Mercurial, Wing first checks that version control has your user name and email. If not, it asks for them and sets them on the host where the repository is located. By default they are set for all your repositories; unchecking Use for all repositories (recommended) sets them only for this one. Pressing Cancel commits without them, which fails with Git. Wing does not ask again for that repository until it is restarted. Commits that AI agents make through Wing ask in the same way.
In Wing Classic, when the legacy AI features are shown, you can
press the AI icon
in the top right of the Commit operation to ask
Wing to suggest a commit message based on the changes made and the contents of some or
all of the files that are being committed. This requires an AI provider and permission
to upload data to it, and Wing prompts for these if they are not yet set. See
Configuring AI Providers for details.
Diff displays the differences between files on the local file system and files in the repository. The diff appears as a view in the revision control tool. Its right-click context menu may be used to copy the diff text, go to the source for a particular section of the diff, or re-run the diff command.
Status displays the status of files. The files are displayed as a tree by default, but may also be displayed as a flat list by right-clicking and selecting View as List. To the left of the file name, there is an icon to indicate if the file has been modified (or added or removed), has a conflict, is locked, or is not registered. Unregistered files are omitted from the status view by default but can be shown by right-clicking on the tool and selecting Show Unregistered.
Log displays the revisions of one or more files or directories. For Git and Mercurial, it shows the graphical log described under Graphical Log below. For Perforce, it lists the revisions with their commit comments.
Revert disposes of any local changes and reverts the local files to match the revision that they were based on in the repository.
Commit Project runs the commit operation against all the files in the project.
Project Status runs the status operation against all the files in the project.
Project Log shows the graphical log of the whole repository that holds the project, for Git and Mercurial. It starts with the current branch, and stays in the version control tool like the Project Status view.
Add marks a file or directory to be added to the repository with the next commit.
Remove requests that a file or directory be removed from the repository with the next commit.
Graphical Log
For Git and Mercurial, Log opens a Log view in the version control tool that shows the repository's history as a branch graph. When a file or directory below the repository's root is selected, the log lists only the commits that change it. When the repository's root or the project is selected, it lists every commit. Running Log again for the same repository and path selects the view that is already open.
Each row shows the commit's place in the graph, its branch, tag, and bookmark labels, the first line of its message, its author, and its date. Authors are shown as initials, such as SD for Stephan Deibel, with more letters where two authors' initials would be the same. Dates are compact: the date without the year and the 24-hour time for this year's commits, and only the date, with the year, for older ones. Hover over a row to see the author's full name and the whole date. To show the whole date and time on every row, uncheck Compact Dates in the context menu, or disable the Version Control > Compact dates in logs preference. A ring marks the commit that the working directory is based on, and a diamond marks a merge. Older commits load as you scroll down. When the view is too narrow to show the graph, some of each commit's message, its author, and its date, the list scrolls sideways.
The menu at the top of the view controls which commits are listed. By default, Current Branch lists the commit that the working directory is based on and its ancestors. All Branches lists the commits of every branch.
The Find in loaded rows box selects the first loaded commit whose summary, author, id, branch, or tags match the text typed into it. Pressing Enter selects the next match. Rows that do not match stay in the list, so the graph is not broken up.
When the history of a repository in the project changes, Wing refreshes the log in place. The line at the top of the view stays where it is, as do the selection and the expanded rows, so new commits appear above it without moving what you are reading. Click on the refresh icon at the top right of the view (the Refresh button in the Classic look) to do this at any time.
If the Version Control > Automatically refresh logs preference is disabled, a bar that reads The history has changed. appears above the log instead. Click on its Refresh link to refresh the log.
To expand a row, click on it, or press Enter or Space. Click on it again to collapse it. The expanded row shows the commit's full id, author, date, links to its parent commits, and its full message. Clicking on a parent link selects that commit.
Checking Show Diff in an expanded row shows the commit's changes, limited to the log's file or directory if it has one. A merge is compared to its first parent. Up to 20 lines of the diff are visible at once, and longer diffs scroll. Double-click on a line of the diff to go to that place in the source. Wing stops reading very long diffs after 5000 lines and adds an Open full diff… link that shows the whole commit in a separate view.
The up and down arrow keys, Page Up, Page Down, Home, and End move the selection. Ctrl-C, or Command-C on macOS, copies the selected commit's id. The right-click context menu also has Copy ID, Show Changeset to show the commit in a separate view, and Diff to Working Copy to compare the working copy to the commit.