Consulta en el archivo git para una rama específica

When I tried to do a git archive on a file from a remote location for a different branch other than head/master, I do get a warning telling that

remote: warning: refname 'xxx' is ambiguous.

The command that I used was

git archive --remote=gitserve:some_repo xxx filename | tar -x
remote: warning: refname 'xxx' is ambiguous.

Pero cuando doy xxx as master or HEAD it works fine. But if it's some branch name I get a warning though the output is there. Let me know if there are some things that I am missing or if there is some issue in my setup.

thanks- Shar

preguntado el 31 de enero de 12 a las 08:01

1 Respuestas

The warning about the ambigious refname tells you that “xxx” is ambigious (who’d have thought that). This means that you have a branch and a tag sharing the same name, or maybe a branch has a name that can be mistaken for a commit ID. Try using “refs/heads/biblioteca” or “refs/tags/etiqueta” as refname.

Respondido el 31 de enero de 12 a las 12:01

Thanks Bombe .. That worked by explicitly referring the branch as refs/heads/branch - Shar

You should, however, name your branches and tags less ambigiously to prevent similar problems in the future. - bomba

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.