diff --git a/cubids/cubids.py b/cubids/cubids.py index 286ca0b3f..e01e5e6e1 100644 --- a/cubids/cubids.py +++ b/cubids/cubids.py @@ -410,7 +410,9 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix, raise_on_error=T if Path(from_file).exists(): # if using datalad, we want to git mv instead of mv if self.use_datalad: - move_ops.append(f"git mv {from_file} {to_file}") + move_ops.append( + f"git mv {os.path.relpath(from_file, str(self.path))} {to_file}" + ) else: move_ops.append(f"mv {from_file} {to_file}")