data-multi-subject
data-multi-subject copied to clipboard
How to do a git rebase master
Working on a branch, I wanted to update it with a recently-updated master branch.
I went ahead with the traditional git rebase master, but encountered the following issue:
Full details
julien-macbook:~/code/spine-generic/data-multi-subject $ git checkout jca/17-defacing
Switched to branch 'jca/17-defacing'
julien-macbook:~/code/spine-generic/data-multi-subject $ git rebase master
First, rewinding head to replay your work on top of it...
git-annex: git status will show sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
git-annex: git status will show sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz
git-annex: git status will show sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz
git-annex: git status will show sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz
git-annex: git status will show sub-stanford06/anat/sub-stanford06_T1w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-stanford06/anat/sub-stanford06_T1w.nii.gz
Applying: Fixed defacing in a few subjects
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz
sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz
sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz
sub-stanford06/anat/sub-stanford06_T1w.nii.gz
Please commit your changes or stash them before you merge.
Aborting
error: Failed to merge in the changes.
Patch failed at 0001 Fixed defacing in a few subjects
hint: Use 'git am --show-current-patch' to see the failed patch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
What's strange, is that the branch jca/17-defacing started of from master, the problematic files listed above where updated only in jca/17-defacing (not on master), so I am wondering why this conflict is showing up. Is this a singularity of git-annex? @kousu @drulex any idea?
I tried the command indicated here, but it didn't help:
Full details
julien-macbook:~/code/spine-generic/data-multi-subject $ git checkout jca/17-defacing
Switched to branch 'jca/17-defacing'
julien-macbook:~/code/spine-generic/data-multi-subject $ gs
julien-macbook:~/code/spine-generic/data-multi-subject $ git status | sed -n 's/modified://p' | xargs git update-index -q --refresh
julien-macbook:~/code/spine-generic/data-multi-subject $ git rebase master
First, rewinding head to replay your work on top of it...
git-annex: git status will show sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
git-annex: git status will show sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz
git-annex: git status will show sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz
git-annex: git status will show sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz
git-annex: git status will show sub-stanford06/anat/sub-stanford06_T1w.nii.gz to be modified, since content availability has changed and git-annex was unable to update the index. This is only a cosmetic problem affecting git status; git add, git commit, etc won't be affected. To fix the git status display, you can run: git update-index -q --refresh sub-stanford06/anat/sub-stanford06_T1w.nii.gz
Applying: Fixed defacing in a few subjects
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
sub-cmrra04/anat/sub-cmrra04_T2w.nii.gz
sub-cmrra05/anat/sub-cmrra05_T2w.nii.gz
sub-oxfordFmrib07/anat/sub-oxfordFmrib07_T1w.nii.gz
sub-stanford06/anat/sub-stanford06_T1w.nii.gz
Please commit your changes or stash them before you merge.
Aborting
error: Failed to merge in the changes.
Patch failed at 0001 Fixed defacing in a few subjects
hint: Use 'git am --show-current-patch' to see the failed patch
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Since this was urgent, I went ahead and clicked on "rebase and merge" directly on github (without being able to rebase and wait for travis)
Even more problematic:
- i renamed the local repos
- did a fresh git clone, git annex init and git annex get, but ran into this:
[jcohen@gra-login3 data-multi-subject]$ git-annex get sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz
get sub-cmrra02/anat/sub-cmrra02_T2w.nii.gz (not available)
Try making some of these repositories available:
5cdba4fc-8d50-4e89-bb0c-a3a4f9449666 -- [email protected]:~/code/spine-generic/data-multi-subject
(Note that these git remotes have annex-ignore set: origin)
failed
git-annex: get: 1 failed
does git-annex know i have another local copy somewhere??
does git-annex know i have another local copy somewhere??
Did you clone from your filesystem?
Unfortunately I don't have extensive experience with git-annex and documentation on using it with the PR model seems to be scarce. Also the fact that the status command can glitch isn't the most reassuring thing..
Did you sync to S3 before making your PR/rebase?
Did you clone from your filesystem?
I'm not sure I understand the question, but I did exactly as instructed here
Did you sync to S3 before making your PR/rebase?
Hum, I don't think I did. I only did a git pull on master, then went on my branch and did the rebase.
I tried the command indicated here, but it didn't help:
I'm 80% confident that this is entirely due to that "cosmetic" glitch that git-annex has. But I'm also only 80% confident in my workaround. Maybe git status was outputting those files as "added" instead of "modified", or reworded modified, or maybe it was outputting in french; there's a lot of ways my workaround could be buggy.
When it happens again paste the output of the plain git status.