Foreman-rake templates:import git failure

Problem:

Expected outcome:
Longer ioutput with diff of imported data and changes made.

Foreman and Proxy versions:
Foreman 1.24.2 (latest GA update (not the nightly)
Proxies at 1.24.2 DNS(powerDNS) TFTP, DHCP, CA, Puppet, Ansible (runs into a failure)

Foreman and Proxy plugin versions:

Distribution and version:
Debian Buster

Other relevant data:

foreman-rake templates:import
rake aborted!
Git::GitExecuteError: git '--git-dir=/tmp/d20200205-25105-lkv3kx/.git' '--work-tree=/tmp/d20200205-        25105-lkv3kx' checkout ''  2>&1:fatal: empty string is not a valid pathspec. please use . instead if you     meant to match all paths
/usr/share/foreman/vendor/ruby/2.5.0/gems/git-1.5.0/lib/git/lib.rb:967:in `command'
/usr/share/foreman/vendor/ruby/2.5.0/gems/git-1.5.0/lib/git/lib.rb:652:in `checkout'
/usr/share/foreman/vendor/ruby/2.5.0/gems/git-1.5.0/lib/git/base.rb:306:in `checkout'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_templates-    6.0.3/app/services/foreman_templates/template_importer.rb:40:in `import_from_git'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_templates-6.0.3/app/services/foreman_templates/template_importer.rb:19:in `import!'
/usr/share/foreman/vendor/ruby/2.5.0/gems/foreman_templates-6.0.3/lib/tasks/foreman_templates_tasks.rake:32:in `block (2 levels) in <top (required)>'
Tasks: TOP => templates:import
(See full trace by running task with --trace)

Hi,
it would be good to know what setting values you use for import. Looking at

Git::GitExecuteError: git '--git-dir=/tmp/d20200205-25105-lkv3kx/.git' '--work-tree=/tmp/d20200205-25105-lkv3kx' checkout ''  2>&1:fatal: empty string is not a valid pathspec. please use . instead if you     meant to match all paths

it seems like there is a problem checking out the git repo because the specified branch is an empty string. I would check first if there are correct values in settings, running the import with verbose output might provide additional information as well. Let me know if tweaking the settings helps.

Please note that using rake task for import/export is deprecated and those tasks will be removed in the future, so I would recommend using hammer commands instead.