I am working on converting a repository from cvs to git. Since cvs treats repository subfolders individually, multiple repositories actually depend on a certain subfolder in the primary repo.
I found what I believe is the exact answer that I need Rewrite history git filter-branch create / split into submodules / subprojects
Unfortunately, when I try to run it, I receive the error
git commit-tree: Syntax error: "(" unexpected
could not write rewritten commit
I don't know how to debug this issue. I tried to echo variables to the terminal and into files, but did not see any created. How can I print a variable defined inside of the filter definition (either to the terminal or to a file)?
Git filter-branch commit-filter operates inside a temp directory under ./.git-rewrite (unless -d option points it elsewhere). The script's output is expected to be the sha1 of the new commit making it unsuitable for debug messages. However you can still use error stream for that purpose, for example:
echo $my_var >&2
The
>&2expression redirects output to the error stream that is not consumed by the commit-filter.