Skip to content

Conversation

@vmaerten
Copy link
Member

@vmaerten vmaerten commented Nov 15, 2025

🚀 Migration from go-git to go-getter

This PR migrates our codebase from go-git to go-getter for several reasons:

As go-getter uses underlying Git, it loads all configuration by default. This is massively used by Terraform and works well.
Using go-getter will open the doors to supporting other remotes like S3 or GCP in the future.

📌 Comparison examples: go-git vs go-getter

🔑 SSH usage

Detail
# https://taskfile.dev

version: '3'
includes:
  app:
    taskfile: [email protected]:go-task/task.git//website/Taskfile.yml

vars:
  GREETING: Hello, World!

tasks:
  default:
    cmds:
      - echo "{{.GREETING}}"
    silent: true
task_ssh

📌 Referencing a specific commit

Detail
# https://taskfile.dev

version: '3'
includes:
  app:
    taskfile: https://github.com/go-task/task.git//website/Taskfile.yml?ref=2b713f564fad541c0c342cf78fe8767e16b7798b

vars:
  GREETING: Hello, World!

tasks:
  default:
    cmds:
      - echo "{{.GREETING}}"
    silent: true
task_git_commit

🏷️ Referencing a tag

Detail
# https://taskfile.dev

version: '3'
includes:
  app:
    taskfile: https://github.com/go-task/task.git//website/Taskfile.yml?ref=v3.45.5

vars:
  GREETING: Hello, World!

tasks:
  default:
    cmds:
      - echo "{{.GREETING}}"
    silent: true
task_git_tags

I've also added local caching to avoid cloning the same repository multiple times. For example, in a setup where a local Taskfile includes a Git-based Taskfile, which itself includes another Taskfile from the same repository, the repo used to be cloned twice. With the new caching mechanism, it's now cloned only once.

@vmaerten vmaerten marked this pull request as ready for review November 15, 2025 16:49
@vmaerten vmaerten self-assigned this Dec 12, 2025
@vmaerten vmaerten added the area: remote Changes related to remote taskfiles. label Dec 12, 2025
@vmaerten vmaerten merged commit cb18334 into main Dec 18, 2025
13 checks passed
@vmaerten vmaerten deleted the go-getter branch December 18, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: remote Changes related to remote taskfiles.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants