Project Validation
Validating Each File Before a Commit
To enable automatic validation of each file before a commit, select the Validate each file before committing option in the Git Client preferences page ( , or , or click the Settings button from the toolbar of the Git Staging view and select Preferences).
If validation problems are detected, the commit operation will be stopped and a dialog box will appear informing you that the problems can be viewed in the "Results" area (in the "Git pre-commit validation" tab). If the Reject commit when validation problems occur option is selected, the dialog box will include a Commit anyway button that allows the commit operation to be completed even if validation issues have been found.
Validating Before a Push Operation
To enable automatic validation of the files from the "Main Files" folder, select the Validate all files from the project's "Main Files" folder before pushing option in the Git Client preferences page ( , or , or click the Settings button from the toolbar of the Git Staging view and select Preferences).
For this option to function properly, Main Files support must be enabled and the files must be properly inserted in the "Main Files" folder. It is also mandatory that a validation scenario be configured because the validation will be based on it. The current repository must be the same as the project loaded in the Project View and there must be no uncommitted changes (if detected, a dialog box will appear offering the option to make a stash be applied after the project validation).
If validation problems are detected, the push operation will be stopped and a dialog box will appear informing you that the problems can be viewed in the "Results" area (in the "Git pre-push validation" tab). If the Reject push when validation problems occur option is selected, the dialog box will include a Push anyway button that allows the push operation to be completed even if validation issues are detected.
Resources
For more information about the validation features that can be enabled for the Git Client, watch our video demonstration: