Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

378
Vistas
Is there a way to mount a git branch (read only) on linux?

Setup: At work we have a git repo where our scripts are. These scripts need to be accessible on all our client linux machines (~400). The current solution is to have a file server, which regularly pulls the main branch. This then is mounted (nfs + autofs).

Question: Is there an easy way to mount a remote git branch read only?

I'm aware of GitFS, but this seems to be overkill. I'm looking for something lightweight, preferably in-memory, i.e. without checking stuff out on disk. I only need access to one branch, no history.

Edit: To clearify this: I want to avoid pulling and cronjobs and stuff like this. Best would be something which transparently mounts a remote git repository much like a read only nfs mount.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Question: Is there an easy way to mount a remote git branch read only?

Yes you can do it in several ways. Both bundle & archive are a read-only repository.

git bundle

# Clone the desired branch (-b flag)
# and pack it into a bundle with the desired name
git clone repo.bundle repo-copy -b master

The output of this is a single file containing the desired branch in a read-only mode since it's not a git repository.


git archive

similar to the above bundle command

# Create a tar archive that contains the contents of the latest commit 
# on the current branch, and 
#extract it in the /var/tmp/junk directory.
git archive --format=tar --prefix=junk/ HEAD | (cd /var/tmp/ && tar xf -)
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda