forum/Cannot get unlocked file contentsgit-annexhttp://git-annex.branchable.com/forum/Cannot_get_unlocked_file_contents/git-annexikiwiki2020-10-12T20:15:28Zcomment 1http://git-annex.branchable.com/forum/Cannot_get_unlocked_file_contents/comment_1_1905d2a9ae0142838f42aff4efd5c643/Lukey2020-10-11T14:01:35Z2020-10-11T14:01:35Z
First, you should try "git annex get" on that file and see if works. If it simply outputs nothing, then you indeed somehow committed a hash link. Use "git log --stat" and look for the commit that changed the file, then copy the commit-id of the commit before that. Then you can get the old version of the file with "git checkout -- ".
comment 2http://git-annex.branchable.com/forum/Cannot_get_unlocked_file_contents/comment_2_496503ae9878d402261910e2dd9bc385/joey2020-10-12T19:11:08Z2020-10-12T18:56:49Z
<p>It's completely normal for an unlocked file whose content is not locally
present to have an annex hash as its content. That is what gets
committed to git normally.</p>
comment 3http://git-annex.branchable.com/forum/Cannot_get_unlocked_file_contents/comment_3_57ee489f24b26b73b28f64566e2b8ff5/Maximilian2020-10-12T19:53:27Z2020-10-12T19:53:27Z
<p>@Lukey: thanks for the tip. Will try this at some point with a new repo. For now I just copied the most recent version of the file from /annex/objects/ of my central repo.</p>
<p>@joey: I am afraid I committed the hash-link contents: 'git annex get' didn't change anything. Still I have no idea how this could happen; I'll dig through the history and report back <img src="http://git-annex.branchable.com/smileys/smile.png" alt=":)" /></p>
comment 3http://git-annex.branchable.com/forum/Cannot_get_unlocked_file_contents/comment_3_be1f3ec26c14ca9adc9d8f24ea096976/joey2020-10-12T20:15:28Z2020-10-12T20:10:38Z
<p>Like I said, committing the hash link, for an unlocked file, is
perfectly normal. And will not result in this behavior.</p>
<p>You need to show command output of commands like git-annex get, git-annex
whereis, git-annex fsck for us to understand what the actual problem is.</p>