Only add commit hash to version string when in the develop branch

This PR changes the version component so that it adds the commit hash to the version string only when the user in the develop branch and the .git directory exists.