def move_local_changes(original_branch, feature_name)
      feature_branch = create_feature_name(feature_name)
      # By checking out the feature branch, the commits on the original branch
      # are copied over. That way we only need to remove pending (local) commits
      # from the original branch.
      git_call "checkout -b #{feature_branch}"
      if local.source_branch == feature_branch
        # Save any uncommitted changes, to be able to reapply them later.
        save_uncommitted_changes = local.uncommitted_changes?
        git_call('stash') if save_uncommitted_changes
        # Go back to original branch and get rid of pending (local) commits.
        git_call("checkout #{original_branch}")
        remote = local.remote_for_branch(original_branch)
        remote += '/' if remote
        git_call("reset --hard #{remote}#{original_branch}")
        git_call("checkout #{feature_branch}")
        git_call('stash pop') if save_uncommitted_changes
        feature_branch
      end
    end
def move_local_changes(original_branch, feature_name)
      feature_branch = create_feature_name(feature_name)
      # By checking out the feature branch, the commits on the original branch
      # are copied over. That way we only need to remove pending (local) commits
      # from the original branch.
      git_call "checkout -b #{feature_branch}"
      if local.source_branch == feature_branch
        # Save any uncommitted changes, to be able to reapply them later.
        save_uncommitted_changes = local.uncommitted_changes?
        git_call('stash') if save_uncommitted_changes
        # Go back to original branch and get rid of pending (local) commits.
        git_call("checkout #{original_branch}")
        remote = local.remote_for_branch(original_branch)
        remote += '/' if remote
        git_call("reset --hard #{remote}#{original_branch}")
        git_call("checkout #{feature_branch}")
        git_call('stash pop') if save_uncommitted_changes
        feature_branch
      end
    end
Move uncommitted changes from original_branch to a feature_branch.
 @return [String] the new local branch uncommitted changes are moved to