Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.
GitHub AE is currently under limited release. Please contact our Sales Team to find out more.

Configuring Git Large File Storage

Once Git LFS is installed, you need to associate it with a large file in your repository.

If there are existing files in your repository that you'd like to use GitHub Enterprise with, you need to first remove them from the repository and then add them to Git LFS locally. For more information, see "Moving a file in your repository to Git LFS."

Si existen archivos de Git LFS referenciados que no se cargaron con éxito, recibiras un mensaje de error. Para obtener más información, consulta la sección "Resolver fallas de carga de Almacenamiento de archivos de gran tamaño Git".

Note: Before trying to push a large file to GitHub Enterprise, make sure that you've enabled Git LFS on your enterprise. For more information, see "Configuring Git Large File Storage on GitHub Enterprise Server."

  1. Abre la TerminalTerminalGit Bash.

  2. Change your current working directory to an existing repository you'd like to use with Git LFS.

  3. To associate a file type in your repository with Git LFS, enter git lfs track followed by the name of the file extension you want to automatically upload to Git LFS.

    For example, to associate a .psd file, enter the following command:

    $ git lfs track "*.psd"
    > Adding path *.psd

    Every file type you want to associate with Git LFS will need to be added with git lfs track. This command amends your repository's .gitattributes file and associates large files with Git LFS.

    Tip: We strongly suggest that you commit your local .gitattributes file into your repository. Relying on a global .gitattributes file associated with Git LFS may cause conflicts when contributing to other Git projects.

  4. Add a file to the repository matching the extension you've associated:

    $ git add path/to/file.psd
  5. Commit the file and push it to GitHub Enterprise:

    $ git commit -m "add file.psd"
    $ git push

    You should see some diagnostic information about your file upload:

    > Sending file.psd
    > 44.74 MB / 81.04 MB  55.21 % 14s
    > 64.74 MB / 81.04 MB  79.21 % 3s

Further reading

¿Te ayudó este documento?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.