From f3526cc86773d7cc06728ad007c268a5a570008c Mon Sep 17 00:00:00 2001
From: Johannes Keyser <johannes.keyser@sport.uni-giessen.de>
Date: Thu, 28 Jan 2021 17:45:38 +0100
Subject: [PATCH] Add some initial steps how to practically use LFS.

---
 .gitattributes |  1 +
 README.md      | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..237fb3f
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.hdf filter=lfs diff=lfs merge=lfs -text
diff --git a/README.md b/README.md
index fdc7281..3506706 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,8 @@
 
 __NOTE: This project is work in progress!__
 
-Initial ideas for this project:
+## Initial ideas for this project
+
 - 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).
 - Provide simple, practical examples what LFS can offer.
@@ -17,6 +18,21 @@ Initial ideas for this project:
     - 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)
+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`.
+
+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.
+    - 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"`.
+      *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).*
+
 ## Useful links
 - https://git-lfs.github.com/
 - https://docs.gitlab.com/ce/topics/git/lfs/
-- 
GitLab