#.git folder from GitRepository

1 messages · Page 1 of 1 (latest)

hardy escarp
#

Hey,
it seems that when I export the dir from GitRepository using Tree() the .git folder is excluded from the export. This is bit unfortunate for my use case. Is there anything I can do about it other than rolling some git-container and doing the clone there manually?

compact yew
fair crane
#

Sorry to necrobump, but this seems to be the only post about this issue around and the playground is gone now and this option isn't documented in the SDK docs. To help others out the (python) code that works for me is:

url = "https://github.com/dagger/dagger"
ref = "v0.11.9"
destination_folder = "/src"
container = await container.with_mounted_directory(
    destination_folder, dag.git(url, keep_git_dir=True).ref(ref).tree()
)
compact yew
compact yew
#

above link should work now @fair crane .Thx for reporting again