Add copy method to CommitCommand

Allows easily creating a modified version of an existing commit without having
to modify the existing object in-place