Integration with Git
This section helps you to integrate Sahi Pro with Git using Sahi Editor.
Git Configuration
Section titled “Git Configuration”Click on the Git Configuration link in Sahi Editor to launch the Git Configuration dialog.

Understanding the Git Configuration dialog
Section titled “Understanding the Git Configuration dialog”
Specify the following Git configuration values as applicable:
- Remote Path: URL for the remote Git repository.
- Branch: Remote branch name.
- Author Name: Name of the Git user.
- Author Email: Email of the Git user.
- Authentication Type: Authentication types like HTTPS, SSH, Netrc can be employed. See the Authentication Type section for details.
- Git Directory: Directory path to clone the branch in the system.
- Git Log Integration: Tick this check-box to integrate Git with Sahi logs and view the specific file version after clicking on the line in logs.
Authentication Type
Section titled “Authentication Type”HTTPS Authentication
Enter the User Name and Password after selecting HTTPS Authentication from the dropdown.

SSH Authentication
Choose SSH Authentication from the Authentication Type dropdown. Specify the file path of the private key file. Also, enter the Passphrase for the private key if applicable.

Netrc Authentication
Choose Netrc Authentication from the Authentication Type dropdown. Netrc Authentication works with both HTTPS and SSH URLs.

Git Commit
Section titled “Git Commit”Click on the Git Commit link in Sahi Editor to launch Git Commit. Git Commit link will appear only after successfully saving the Git Configuration.

Git Commit can also be launched from the Navigator of Sahi Editor by right-clicking on a file or directory name. Clicking on the context menu item Git Commit will add the selected file or directory to Staged Changes.

Understanding the Git Commit tab
Section titled “Understanding the Git Commit tab”
- Project Info: It specifies the Repository name and Branch Name.
- Staged Changes: It contains the list of modified files staged for a commit.
- Unstaged Changes: It contains the list of modified files.
- Commit Message: Message to describe changes in the commit.
- Author: This is the name and email of the author who is checking-in commit. It will be auto-filled using the author details saved in the Git Configuration.
- Check-in: This button will check-in staged changes with a commit message.
- Check-out: This button will check-out the latest changes from the remote repository.
Click on a file to move it to and fro between Staged Changes and Unstaged Changes. Also, right-clicking on a file will show the following context menu.

Compare with HEAD Revision: Compares the current file with HEAD Revision.
Replace with HEAD Revision: Replaces the current file with HEAD Revision.
Add to index: Adds the current file to index (Staged Changes).
Git History
Section titled “Git History”Click on the Git History link in Sahi Editor to launch Git History. Git History link will appear only after successfully saving the Git Configuration.

Git History can also be launched from the Navigator of Sahi Editor by right-clicking on a file or directory name. Clicking on the context menu item Git History will show all commits checked in for the selected file or directory.

Understanding the Git History tab
Section titled “Understanding the Git History tab”
- List of all commits made in the remote repository.
- Information of the selected commit like commit id, author, date and message.
- Files that were changed by the selected commit.
- Line differences that were made in the selected file by the selected commit.
- Search box to search for commits using commit id, message, or author details.
Click on a commit to select and display its information. The list of files changed by the selected commit is shown at the right bottom. Select a file from this list to show the changes made in that file. Also, right-clicking on a file from this list will show a context menu shown in the image below. Clicking on Compare with Current Version will compare the commit version of the file with its current version.

If two commits are selected using Ctrl + click (⌘ + click on Mac), then right-clicking on them will show a context menu shown in the image below. Clicking on Compare with Each Other will compare the selected commits.

Git Compare
Section titled “Git Compare”The Git Compare tab will compare and show the differences between two versions of a file. It can show the following comparisons.
Comparison between local version and Head version of a file
Right-click on a file in the Git Commit tab and select Compare with HEAD Revision. This will open a comparison between the local version and the Head version of the selected file.

Comparison between local version and Current version of a file
In the Git History tab, the list of files changed by the selected commit is shown at the right bottom. Right-click on a file from this list and select Compare with Current Version. This will open comparison between the local version of the file and the version of the file in the selected commit.
Comparison between two commits
In the Git History tab, select two commits using Ctrl + click (⌘ + click on Mac). Right-click on them and select Compare with Each Other. This will open comparison between the two selected commits. This comparison displays all the modified files in a tree structure. Select any file and view the differences.


