From cd0f72844dbae302d6b8ac1a2bb573a7405d0934 Mon Sep 17 00:00:00 2001 From: Mathieu Guay-Paquet Date: Wed, 17 Aug 2022 10:32:03 -0400 Subject: [PATCH 1/2] Add instruction for working from a fork --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index ea21f3d83dd..5e43723c746 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,29 @@ git pull && git annex get . See more at [the official documentation](https://git-annex.branchable.com/walkthrough/) and take note of our [in-lab troubleshooting](https://github.com/neuropoly/data-management/blob/master/git-annex.md). +## Working from a forked repository + +> ⚠️ For advanced users only. Normally the instructions under [Download](#Download) should be enough. + +If you have forked this repository on Github (so that you have a copy `your-user-name/data-multi-subject` of `spine-generic/data-multi-subject`), you will need to take a few extra synchronization steps to get the latest data with `git annex get`. + +1. In your local clone of `your-user-name/data-multi-subject`, make sure that `spine-generic/data-multi-subject` is also configured as a remote: + ``` + git remote -v + # the answer should show both your-user-name/data-multi-subject.git (probably named "origin") + # and spine-generic/data-multi-subject (probably named "upstream") + ``` + + If `spine-generic/data-multi-subject` is missing, you can add it with: + ``` + git remote add upstream https://github.com/spine-generic/data-multi-subject.git + ``` + +2. Then, to update your local clone, make sure to fetch the `git-annex` branch from `spine-generic/data-multi-subject` before running `git annex get`: + ``` + git fetch upstream && git pull && git annex get . + ``` + ## Analysis The instructions to process this dataset are available in the [spine-generic documentation](https://spine-generic.readthedocs.io/en/latest/analysis-pipeline.html). From 6097a05e72a568545dfedae2ddf184f246856748 Mon Sep 17 00:00:00 2001 From: Mathieu Guay-Paquet Date: Mon, 29 Aug 2022 14:56:23 -0400 Subject: [PATCH 2/2] Incorporate suggestions from review --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5e43723c746..367907f0b37 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,14 @@ See more at [the official documentation](https://git-annex.branchable.com/walkth > ⚠️ For advanced users only. Normally the instructions under [Download](#Download) should be enough. -If you have forked this repository on Github (so that you have a copy `your-user-name/data-multi-subject` of `spine-generic/data-multi-subject`), you will need to take a few extra synchronization steps to get the latest data with `git annex get`. +If you have forked this repository on Github (so that you have a copy `your-user-name/data-multi-subject` of `spine-generic/data-multi-subject`), you will need to take a few extra synchronization steps to get the latest data with `git annex get`. Otherwise, you may get an error message like: +``` +get some-file-name.nii.gz (not available) + No other repository is known to contain the file. + + (Note that these git remotes have annex-ignore set: origin) +failed +``` 1. In your local clone of `your-user-name/data-multi-subject`, make sure that `spine-generic/data-multi-subject` is also configured as a remote: ``` @@ -67,11 +74,13 @@ If you have forked this repository on Github (so that you have a copy `your-user If `spine-generic/data-multi-subject` is missing, you can add it with: ``` git remote add upstream https://github.com/spine-generic/data-multi-subject.git + git config remote.upstream.annex-readonly true ``` 2. Then, to update your local clone, make sure to fetch the `git-annex` branch from `spine-generic/data-multi-subject` before running `git annex get`: ``` - git fetch upstream && git pull && git annex get . + git fetch upstream +refs/heads/git-annex:refs/remotes/upstream/git-annex + git pull && git annex get . ``` ## Analysis