I, by mistake, added some files directly to the remote locations and my local repository, afterwards, using git annex get '*'
to get "all" the new files from the remotes I created some file.variant-xxxx.ext
files. For me this is undesirable. I'm sure the files are almost the same (I'm presuming some metadata got changed, they are audio files) so I want to remove one keeping the other and removing the variant-xxxx
string. Is there a way this is possible without manually drooping/renaming all these files?
Probably the best thing to do is to use
git log --stat
to find the commits that were made on the remote that added the conflicting files. Also find the merge commit that created the variant files. You can thengit revert
the merge commit, and follow up bygit revert
the commits that added the conflicting files. This will bring your working tree back to the state it was in originally.Alternatively, if your current repo has the contents present for the variants of the files you want to keep, while the remote repos contain the contents of the variants you want to delete, you could use this command to delete the variants that don't have their contents in the local repo: