Compare deployed files and folders with their local versions
The correspondence between files and folders in your GoLand project and their versions on a server is set through deployment server mappings. For the sake of simplicity, any file or folder in your GoLand project is called local and any file or folder on the server is called remote, even if the server is actually installed on your machine. For details, see Configure synchronization with a Web server.
Access a server
Open the Remote Host tool window by choosing or from the main menu.
Select the required deployment server from the list. The tool window shows a tree view of files and folders under the server root. If no relevant server is available in the list, click , and in the Deployment dialog that opens configure access to the required server.
Comparing files and folders on the server with their local versions
Each remote file or folder is mapped to one and only one local file or folder. Therefore for each remote file or folder, GoLand detects its local version so you can compare them at any time in the Difference viewer.
Compare a remote file with its local version
Open the Remote Host tool window ( or ) and select the required deployment server from the list.
Select the file, and then select Compare with local version from its context menu.
In the Differences Viewer for Files dialog that opens, explore the differences and apply them, if necessary, using the button. For details, see Viewing Differences Between Files.
Compare a remote folder with its local version
Open the Remote Host tool window ( or ) and select the required deployment server from the list.
Select the folder and choose Sync with local from the context menu of the selection.
In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable. See comparing two folders in the difference viewer.
Comparing local files and folders with their versions on the server
Because a local file or folder can be mapped to an unlimited number of remote counterparts, GoLand can uniquely identify remote versions of local files or folders only when they are mapped through the default deployment server. If no such default deployment server is appointed, you have to choose the relevant configuration manually. Note that server groups are displayed in the server selection list only for consistency purposes: currently, it is not possible to compare local files with the ones deployed to a server group.
Compare a local file with its remote version
Select the file in the Project tool window.
In the context menu, select
if a default server is appointed. Otherwise, select and then choose the relevant server from the list.In the Differences Viewer for Files dialog, that opens, explore the differences and apply them, if necessary, using the button. For details, see Viewing Differences Between Files.
Compare a local folder with its remote version
Select the folder in the Project tool window.
From the context menu of the selection, choose
if a default server is appointed. Otherwise, choose and then choose the relevant server from the list.In the Differences Viewer for Folders that opens, explore the differences and synchronize the files, where applicable. See comparing two folders in the difference viewer.
Compare locally changed files with their remote versions
Switch to the Local Changes view to view the locally changed files.
Right-click a file, then select Deployment | Compare with Deployed to from the context menu, and choose the target deployment server from the list. If the default server group is appointed, you can also select Compare with Deployed to <default deployment server>.
See Manage files under version control for details.
Compare the files synchronized with a VCS repository with their remote versions
Synchronize the contents of your local files with the VCS repository by pressing Ctrl+T or selecting
from the main menu.Switch to the Update Info tab of the Version Control tool window Alt+9.
Right-click a file, then select Deployment | Compare with Deployed to from the context menu, and choose the target deployment server from the list. If the default server is appointed, you can also select Compare with Deployed to <default deployment server>.