File: Recovering_deleted_file_in_direct_mode.mdwn

package info (click to toggle)
git-annex 7.20190129-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 56,292 kB
  • sloc: haskell: 59,105; sh: 1,255; makefile: 225; perl: 136; ansic: 44
file content (13 lines) | stat: -rw-r--r-- 612 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
I accidentally deleted a file from a git-annex repository with a plain "rm". How can I restore it from other repositories that have it?

I tried using

    git annex copy --from $REMOTE $REMOVED_FILE

but git-annex complaints about

    $REMOVED_FILE not found

I suppose that I could switch to indirect mode and do checkout and older version, but I'd prefer not to. My repository contains thousands of quite big files; it would take a lot of time and the probability of something going wrong during the conversion is quite high (see other bugs reported during import).

I'm using git-annex 5.20141024-g613f396.