Magnilex Magnilex - 1 year ago 163
Git Question

How to disable automatic commits of .gitignore files?

We have a test team using Hp Unified Functional Testing. The test and development teams all share the same Git repository. No one in the test team uses the Git capabilities in HP-UFT, files are commited and pushed outside the tool.

Despite this, HP-UFT (automatically) creates and performs commits of .gitignore files, looking like below. The commits seems to be on a per-project basis, and are cluttering the git log.

#UFT ignore section



#end UFT ignore section

The commits are not automatically pushed.

The commit message is the same for all commits (and is not very informative):

UFT Commit

How can this wierd behaviour be disabled in Hp Unified Functional Testing (version 12.51)? To be extra clear, what I am looking for is a way to make the tool not perform these commits. I know these files and folders should be ignored, but I would rather manage one single .gitignore file further up in the folder hierarchy.

Googling or reading the User Guide has not been to any help.

I put a bounty on this question, specifying that I would like an answer containing either:

  • A way to disable these commits from the tool itself. I know I can do workarounds with git hooks, and other solutions.

  • A link to a trustworthy source specifying that it is not possible to disable this behaviour from the tool.

After the bounty expired, no answer fulfills these conditions, therefore I am trying to clarify what kind of answers I want.

Answer Source

Both the answers by mpril and VonC are correct in the way that it doesn't seem to exist a straightforward way to disable the automatic commits of the files from HP-UFT. So the Git way to go would be to use the solution given by VonC and add a Git hook forcing these commits to be ignored.

However, we succesfully found out a workaround in HP-UFT which in my opinion feels better:

The addin for Git is located in HP-UFT-INSTALLATION-DIRECTORY/addins/VersionControlSystem. Changing the name of this folder to, for example, VersionControlSystem_backup (or simply remove the folder) makes sure HP-UFT does not perform these unwanted commits.

Of course, it would be prefered if there was a setting inside the application to disable the addin, but it doesn't seem to exist. Hopefully HP will fix this (or preferably the root cause with unwanted commits) in future releases of the application.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download