The error in Terragrunt clearly shows the branch name is having the part after / chopped off.
ERRO[0001] 1 error occurred:
* error downloading 'https://github.com/xxx/infrastructure-modules.git?ref=feat': /opt/homebrew/bin/git exited with 1: error: pathspec 'feat' did not match any file(s) known to git
ERRO[0001] Unable to determine underlying exit code, so Terragrunt will exit with error code 1
The issue appears to be with the logic here on splitting the URL based on / here
https://github.com/hashicorp/go-getter/blob/0edab85348271c843782993345b07b1ac98912e6/detect_github.go#L25
When using this in Terragrunt the following works
But this does not
The error in Terragrunt clearly shows the branch name is having the part after / chopped off.
Issue raised in Terragrunt for this is https://github.com/gruntwork-io/terragrunt/issues/2473