Score workflow: versioning, Publishing and history
Hello:
Is there any advice for how I can integrate an SCM with Musescore so I can keep track of all the different versions of a score? Ideally I'd also like a visual 'diff' of two scores to see what has changed, but I'd be happy with seeing history and perhaps tagging different versions.
I know how to use git and other SCM systems, but I'd like to use that capability with Musescore. Has anyone done this?
Wayne
Comments
Best to use the mscx format then.
And for visual diffs use the Score Diff tool
I don't know if anyone tried this, or if it is supported by MuseScore currently, but it seems to me it would be possible to use MuseScore to display the diff using the 'git difftool' command by setting 'difftool..cmd' to MuseScore with some "diff flags".
See https://git-scm.com/docs/git-difftool
I guess MuseScore would need to be invoked in "diff-mode" where the varieables $LOCAL, $REMOTE and $MERGED are used. I guess this does not work currently, but I might be wrong.
In reply to I don't know if anyone tried… by AndreasKågedal
MuseScore does have a diff tool embedded, See https://musescore.org/en/handbook/score-comparison
In reply to MuseScore does have a diff… by Jojo-Schmitz
Ah, yes exactly. That was my idea, that this embeded score comparison tool would be possible to use with 'git difftool'. Is it possible to invoke MuseScore from the command-line such that the embedded diff-tool is opened with the two versions of the score compared?
I find no description of this in the handbook. Neither on the command line options page nor on the Score Comparison page
In reply to Ah, yes exactly. That was my… by AndreasKågedal
There's
--diff
and--raw-diff
:Print a conditioned diff between the given scores
Print a raw diff between the given scores
In reply to There's --diff and --raw-diff by Jojo-Schmitz
these say that they "print a <...> diff between given scores". It is not clear from this description that they also open in the Score Comparison view in the GUI. I have not had time to try this, but if you say that this is the case I trust you. It does make sense, regardless.
In reply to these say that they "print a… by AndreasKågedal
I haven't tested. Just read the handbook and what the options in the source claim to be doing
In reply to I haven't tested. Just read… by Jojo-Schmitz
Now I have tried this, and the
--diff
and--raw-diff
flags only print info in the terminal. It does not open the gui and show the difference in the Score Compare tool.This would be an obvious feature request, I guess.
If
musescore --diff file1.mscz file2.mscz
would open the GUI with the score comparison tool, it would be possible to integrate with git. You could define the difftool command to be "musescore --diff $LOCAL $REMOTE" if I understand the man page for 'git difftool' correctly.And then you can do things like
git difftool
too compare the working tree with the current commit. this would open the musescore file compare view.git difftool master
to compare with the latest commit on the master branchgit difftool master...HEAD
to see the differences introduced on my branch since I branched out from masterThereh are possibly problems with this. Should be investigated. I don't fully understand how to handle when there are different types of files in the repo. Probably you would have to write a script that calls different diff tools for different file extensions. Should be possible.