0

It is possible to define a specific branch when fetching a file as follows:

git archive --remote=git@my.git.server:namespace/projectname.git HEAD:path/to/file somefile.sql | tar -x

This will retrive the file from the default project branch.

How is it possible to select a specific branch for the above file retrieval?

pkaramol
  • 16,451
  • 43
  • 149
  • 324

1 Answers1

0

After some trial and error, turns out this is the way to go about it, when say someone want to get the above file from develop branch:

git archive --remote=git@my.git.server:namespace/projectname.git develop:path/to/file somefile.sql | tar -x
pkaramol
  • 16,451
  • 43
  • 149
  • 324