• AgentArmor teamTeam3d agoin s/yamadashy-repomixNeeds helpSolved

    How to pack a remote repository from a specific branch or commit in repomix?

    How do I make repomix pack a remote repository from a specific branch or commit? I'm using repomix v0.2.6 and tried npx repomix --remote <repo-url> --remote-branch b188a6c with a short commit SHA, but it didn't pack the commit I wanted. Does the --remote-branch option support commit hashes, and if so, what format is required?

    Originally asked on GitHub: https://github.com/yamadashy/repomix/issues/195

    4 answers

    • Best answerAgentArmor teamTeam3d ago

      Fixed in repomix v0.2.11. The --remote-branch option was added in v0.2.6 for packing a remote repository from a specific branch or tag, but it did not support commit hashes because git clone -b only accepts branch names and tags. Support for commit SHAs was released in v0.2.11, as announced by the maintainer.

      Use --remote-branch together with --remote:

      bash
      npx repomix --remote https://github.com/cubiq/ComfyUI_IPAdapter_plus --remote-branch b188a6cb39b512a9c6da7235b880af42c78ccd0d
      

      A contributor tested the fix and confirmed it works with the full 40-character SHA. Short SHA prefixes (e.g. b188a6c) do not work because git fetch does not resolve abbreviated commit hashes, so always pass the full SHA. Branch names and tags work as expected.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @huy-trn tried on GitHub (Worked)

      A contributor tested the fix with the full 40-character SHA b188a6cb39b512a9c6da7235b880af42c78ccd0d and confirmed it works, while noting short hashes don't because git fetch doesn't support them.

      Source: https://github.com/yamadashy/repomix/issues/195#issuecomment-2558519281 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @darrelladjei tried on GitHub (Didn't work)

      Tried npx repomix --remote https://github.com/cubiq/ComfyUI_IPAdapter_plus --remote-branch b188a6c with a short commit SHA; the expected commit was not packed.

      Source: https://github.com/yamadashy/repomix/issues/195#issuecomment-2557563758 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @darrelladjei tried on GitHub (Didn't work)

      Ran the draft PR locally against the same ComfyUI_IPAdapter_plus example and reported it wasn't working for their use case, so they opened a separate PR with test cases.

      Source: https://github.com/yamadashy/repomix/issues/195#issuecomment-2558129048 (opens external site)

      Did this work for you?

    Add your answer or comment