Commit cc22bce1 authored by Antoine Beaupré's avatar Antoine Beaupré Committed by Achilleas Pipinellis

simplify git-annex to LFS migration guide

parent 787c954c
...@@ -43,7 +43,9 @@ Annex to Git LFS. ...@@ -43,7 +43,9 @@ Annex to Git LFS.
If you know what you are doing and want to skip the reading, this is what you If you know what you are doing and want to skip the reading, this is what you
need to do (we assume you have [git-annex enabled][annex-gitlab-use] in your need to do (we assume you have [git-annex enabled][annex-gitlab-use] in your
repository). Fire up a terminal, navigate to your Git repository and: repository and that you have made backups in case something goes wrong).
Fire up a terminal, navigate to your Git repository and:
1. Disable `git-annex`: 1. Disable `git-annex`:
...@@ -57,6 +59,7 @@ repository). Fire up a terminal, navigate to your Git repository and: ...@@ -57,6 +59,7 @@ repository). Fire up a terminal, navigate to your Git repository and:
1. Enable `git-lfs`: 1. Enable `git-lfs`:
``` ```
git lfs install
git lfs track <files> git lfs track <files>
git add . git add .
git commit -m "commit message" git commit -m "commit message"
...@@ -81,9 +84,22 @@ deprecated in Git Annex version 6, so you may need to upgrade your repository ...@@ -81,9 +84,22 @@ deprecated in Git Annex version 6, so you may need to upgrade your repository
if the server also has Git Annex 6 installed. Read more in the if the server also has Git Annex 6 installed. Read more in the
[Git Annex troubleshooting tips][annex-tips] section. [Git Annex troubleshooting tips][annex-tips] section.
1. Backup your repository
```bash
cd repository
git annex sync --content
cd ..
git clone repository repository-backup
cd repository-backup
git annex get
cd ..
```
1. Use `annex direct`: 1. Use `annex direct`:
```bash ```bash
cd repository
git annex direct git annex direct
``` ```
...@@ -198,6 +214,17 @@ branches created by Git Annex: `git-annex`, and all under `synced/`. ...@@ -198,6 +214,17 @@ branches created by Git Annex: `git-annex`, and all under `synced/`.
![repository branches](images/git-annex-branches.png) ![repository branches](images/git-annex-branches.png)
You can also do this on the commandline with:
```bash
git branch -d synced/master
git branch -d synced/git-annex
git push origin :synced/master
git push origin :synced/git-annex
git push origin :git-annex
git remote prune origin
```
If there are still some Annex objects inside your repository (`.git/annex/`) If there are still some Annex objects inside your repository (`.git/annex/`)
or references inside `.git/config`, run `annex uninit` again: or references inside `.git/config`, run `annex uninit` again:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment