Skip to content

Support for copying multiple files/folders to arbitrary destinations in a single command #43

@jens-duttke

Description

@jens-duttke

First of all, thank you for creating GitPick! It's an excellent tool.

One limitation I've run into is that GitPick currently only allows cloning a single file or folder per command. In many workflows, it would be very helpful to:

  • Combine multiple directories or files from a repository into one target directory.
  • Copy files from different repository locations to different target directories.

Currently, this requires running gitpick multiple times, for example:

npx -y gitpick owner/repo/tree/main/dir1 target-dir -o
npx -y gitpick owner/repo/tree/main/dir2 target-dir -o
npx -y gitpick owner/repo/tree/main/file1 target-dir -o

For example, it would be great if there was a way to specify multiple source paths and their destinations in a single command:

# simple grouped syntax
npx gitpick owner/repo "{dir1,dir2,file1}:target/"

# more flexible mapping
npx gitpick owner/repo --map "dir1:target1,dir2:target2,file1:target3"

# easier to maintain via config file
npx gitpick owner/repo --config pick.json
# pick.json:
# [{ "src": "dir1", "dest": "target1" }, { "src": "file1", "dest": "target2" }]

This feature would make GitPick even more flexible for assembling projects from multiple parts of a repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions