*How to use Git LFS on JLU GitLab (and if this is a good idea)*
...
...
@@ -10,6 +10,10 @@ __NOTE: This project is work in progress!__
- Explain/discuss/elaborate if LFS on JLU GitLab is the best choice for your data/project.
- Contrast especially with [JLUdata](https://jlupub.ub.uni-giessen.de/handle/jlupub/1).
- Explain why data don't belong in a plain Git repository:
- Because it degrades performance and bloats the repository.
- Because it is useless, since data are not expected to come in "versions" that need to be controlled.
- Because it is impossible (or at least a huge hassle) to actually delete data from a Git repository, especially if others have a clone.
- Provide simple, practical examples what LFS can offer.
- Tight integration of some data and analysis code.
- 1st idea: Python code to generate some random data, and plot them in a Jupyter notebook.
...
...
@@ -18,20 +22,21 @@ __NOTE: This project is work in progress!__
- All data, code and text must be self-authored and [licensed as CC0](LICENSE.md), or the material must be properly cited and licensed openly.
- This project is publicly available to anyone.
## Practical steps how to use LFS (UNFINISHED)
## Practical steps how to use Git LFS (UNFINISHED)
Assumptions:
- You have Git installed on your machine and you know the basics how to use it.
(If you don't, [here](https://git-scm.com/) is a good point to start).
- You have a project on JLU GitLab, including a Git repository, of which you have a clone on your local machine.
- You can type git commands into a terminal.
Below, terminal commands are indicated with `a different font, like this`.
(If you don't, [here is a good starting point](https://git-scm.com/)).
- You have a project on JLU GitLab that includes a Git repository, and you have a local clone of it on your machine.
- You can type Git commands into a command line interface (terminal).
Below, example terminal commands are indicated with a different font, `like this`.
1. On your machine, install the Git LFS extension ([here](https://git-lfs.github.com/) are some instructions).
2. In your local repository clone, configure which types of files should be tracked by LFS.
2. In your local repository clone, configure which types of files you want to track by LFS.
- For example, to let LFS keep track of HDF files, you can type: `git lfs track "*.hdf"`.
- This will create (or change) the Git configuration file [`.gitattributes`](.gitattributes).
You should track this configuration change in Git, e.g. by the usual Git commands `git add .gitattributes` and `git commit -m "start tracking HDF files with LFS"`.
- This will create/change the Git configuration file [`.gitattributes`](.gitattributes).
You should track this configuration change in Git, e.g. by the usual Git commands `git add .gitattributes` and `git commit -m "start tracking HDF files with LFS"`.
*Note that because the file name `.gitattributes` starts with a dot, it may be hidden from view (on UNIX derivatives, use `ls -a` to see it).*
3. FIXME: How to add files into LFS, and how to interact with them.