Elaborate getting a current working copy.

The `git checkout` step from #3098 got removed by some merge, so here it is again.
Alright, then we leave it as it is. Thanks for following this issue, @batjko!