anchor.diff:    print(bold("  dart tools/migration/bin/migrate.dart "
         "${dryRun ? '--dry-run ' : ''}$step $testDir"));
   }
  +
  +bool _createGitBranch(String testDir) {
  +  var dirName = toNnbdPath(testDir)
  +      .replaceAll("/", "-")
  +      .replaceAll("_", "-")
  +      .replaceAll(RegExp("[^a-z0-9-]"), "");
  +  var branchName = "migrate-$dirName";
  +  var success = runProcess("git", ["checkout", "-b", branchName]);
  +  if (success) {
  +    print(green("Created and switched to Git branch '$branchName'."));
  +  } else {
  +    print(red("Failed to create Git branch '$branchName'."));
  +  }
  +
  +  return success;
  +}
  
positive.code: 
  /// Creates a Git branch whose name matches [testDir].
  void _createBranch(String testDir) {
    var dirName = toNnbdPath(testDir)
        .replaceAll("/", "-")
        .replaceAll("_", "-")
        .replaceAll(RegExp("[^a-z0-9-]"), "");
    var branchName = "migrate-$dirName";
    if (runProcess("git", ["checkout", "-b", branchName])) {
      print(green("Created and switched to Git branch '$branchName'."));
      _showNextStep("Next, copy the migrated files over", "copy", testDir);
    } else {
      print(red("Failed to create Git branch '$branchName'."));
    }
  }
  
  /// Copies files from [testDir] to the corresponding NNBD test directory.
  ///
  /// Checks for collisions.
  void _copyFiles(String testDir) {
    for (var from in listFiles(testDir)) {
      var to = toNnbdPath(from);
      if (fileExists(to)) {
  
negative.code:   var step = arguments[0];
    var testDir = arguments[1];
  
    // If the test directory is just a single identifier, assume it's a language
    // test subdirectory.
    if (!testDir.contains("/")) testDir = "language_2/$testDir";
  
    switch (step) {
      case "branch":
        _createBranch(testDir);
  