100% found this document useful (3 votes)
27 views

(Ebook) Hands-on Azure Repos: Understanding Centralized and Distributed Version Control in Azure DevOps Services by Chaminda Chandrasekara, Pushpa Herath ISBN 9781484254257, 1484254252 - Explore the complete ebook content with the fastest download

The document provides information about various eBooks available for instant download on ebooknice.com, focusing on topics related to Azure DevOps, including Azure Repos, Azure Pipelines, and GitHub Actions. Each eBook includes details such as authors, ISBN numbers, and links for purchase. The content is aimed at developers looking to enhance their skills in version control and continuous integration/deployment using Azure services.

Uploaded by

shalomhaihai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
27 views

(Ebook) Hands-on Azure Repos: Understanding Centralized and Distributed Version Control in Azure DevOps Services by Chaminda Chandrasekara, Pushpa Herath ISBN 9781484254257, 1484254252 - Explore the complete ebook content with the fastest download

The document provides information about various eBooks available for instant download on ebooknice.com, focusing on topics related to Azure DevOps, including Azure Repos, Azure Pipelines, and GitHub Actions. Each eBook includes details such as authors, ISBN numbers, and links for purchase. The content is aimed at developers looking to enhance their skills in version control and continuous integration/deployment using Azure services.

Uploaded by

shalomhaihai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

Instant Ebook Access, One Click Away – Begin at ebooknice.

com

(Ebook) Hands-on Azure Repos: Understanding


Centralized and Distributed Version Control in
Azure DevOps Services by Chaminda Chandrasekara,
Pushpa Herath ISBN 9781484254257, 1484254252

https://ebooknice.com/product/hands-on-azure-repos-
understanding-centralized-and-distributed-version-control-
in-azure-devops-services-50195564

OR CLICK BUTTON

DOWLOAD EBOOK

Get Instant Ebook Downloads – Browse at https://ebooknice.com


Instant digital products (PDF, ePub, MOBI) ready for you
Download now and discover formats that fit your needs...

Start reading on any device today!

(Ebook) Hands-on Azure Repos: Understanding Centralized and Distributed Version


Control in Azure DevOps Services by Chaminda Chandrasekara, Pushpa Herath ISBN
9781484254240, 1484254244

https://ebooknice.com/product/hands-on-azure-repos-understanding-centralized-
and-distributed-version-control-in-azure-devops-services-53001822

ebooknice.com

(Ebook) Hands-on Azure Pipelines: Understanding Continuous Integration and


Deployment in Azure DevOps by Chaminda Chandrasekara, Pushpa Herath ISBN
9781484259016, 1484259017

https://ebooknice.com/product/hands-on-azure-pipelines-understanding-continuous-
integration-and-deployment-in-azure-devops-11295326

ebooknice.com

(Ebook) Hands-on GitHub Actions by Chaminda Chandrasekara; Pushpa Herath ISBN


9781484264638, 1484264630

https://ebooknice.com/product/hands-on-github-actions-28595812

ebooknice.com

(Ebook) Hands-on GitHub Actions by Chaminda Chandrasekara; Pushpa Herath ISBN


9781484264645, 9781484264638, 1484264649, 1484264630

https://ebooknice.com/product/hands-on-github-actions-33161346

ebooknice.com
(Ebook) Hands-On Functional Test Automation: With Visual Studio 2017 and Selenium by
Chaminda Chandrasekara, Pushpa Herath ISBN 9781484244104, 1484244109, B07S3G41PX

https://ebooknice.com/product/hands-on-functional-test-automation-with-visual-
studio-2017-and-selenium-53001810

ebooknice.com

(Ebook) Hands-On Functional Test Automation: With Visual Studio 2017 and Selenium by
Chaminda Chandrasekara; Pushpa Herath ISBN 9781484244104, 9781484244111, 1484244109,
1484244117

https://ebooknice.com/product/hands-on-functional-test-automation-with-visual-
studio-2017-and-selenium-24115942

ebooknice.com

(Ebook) Hands-on GitHub Actions: Implement CI/CD with GitHub Action Workflows for
Your Applications by Chaminda Chandrasekara, Pushpa Herath ISBN 9781484264645,
1484264649

https://ebooknice.com/product/hands-on-github-actions-implement-ci-cd-with-
github-action-workflows-for-your-applications-58725786

ebooknice.com

(Ebook) Azure Cloud Security for Absolute Beginners: Enabling Cloud Infrastructure
Security with Multi-Level Security Options by Pushpa Herath ISBN 9781484278598,
1484278593

https://ebooknice.com/product/azure-cloud-security-for-absolute-beginners-
enabling-cloud-infrastructure-security-with-multi-level-security-
options-36477098

ebooknice.com

(Ebook) Migrating a Two-Tier Application to Azure: A Hands-on Walkthrough of Azure


Infrastructure, Platform, and Container Services by Peter De Tender ISBN
9781484264379, 1484264371

https://ebooknice.com/product/migrating-a-two-tier-application-to-azure-a-hands-
on-walkthrough-of-azure-infrastructure-platform-and-container-services-24659098

ebooknice.com
Hands-on
Azure Repos
Understanding Centralized and
Distributed Version Control in
Azure DevOps Services

Chaminda Chandrasekara
Pushpa Herath

www.allitebooks.com
Hands-on Azure Repos
Understanding Centralized
and Distributed Version Control
in Azure DevOps Services

Chaminda Chandrasekara
Pushpa Herath

www.allitebooks.com
Hands-on Azure Repos: Understanding Centralized and Distributed Version Control
in Azure DevOps Services

Chaminda Chandrasekara Pushpa Herath


Colombo, Sri Lanka Hanguranketha, Sri Lanka

ISBN-13 (pbk): 978-1-4842-5424-0 ISBN-13 (electronic): 978-1-4842-5425-7


https://doi.org/10.1007/978-1-4842-5425-7

Copyright © 2020 by Chaminda Chandrasekara and Pushpa Herath


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Smriti Srivastava
Development Editor: Siddhi Chavan
Coordinating Editor: Shrikant Vishwakarma
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street,
6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-
sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a
Delaware corporation.
For information on translations, please e-mail [email protected], or visit www.apress.com/
rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-5424-0. For more
detailed information, please visit www.apress.com/source-code.
Printed on acid-free paper

www.allitebooks.com
Let this book be a daily reference guide for all the
developers who use Azure Repos.

www.allitebooks.com
Table of Contents
About the Authors���������������������������������������������������������������������������������������������������� xi
About the Technical Reviewer������������������������������������������������������������������������������� xiii
Acknowledgments���������������������������������������������������������������������������������������������������xv
Introduction�����������������������������������������������������������������������������������������������������������xvii

Chapter 1: Getting Started with Azure Team Foundation Version Control���������������� 1


Lesson 1-1: Creating a Team Project with TFVC and Adding a TFVC Repo to the
Existing Team Project�������������������������������������������������������������������������������������������������������������������� 2
Lesson 1-2: Using Visual Studio Team Explorer���������������������������������������������������������������������������� 5
Lesson 1-3: Adding New/Existing Solutions to TFVC��������������������������������������������������������������������� 8
Lesson 1-4: Changing Settings for TFVC in Visual Studio���������������������������������������������������������� 16
File Types������������������������������������������������������������������������������������������������������������������������������� 16
Workspace Settings��������������������������������������������������������������������������������������������������������������� 17
Source Control Settings��������������������������������������������������������������������������������������������������������� 19
Check-Out Settings��������������������������������������������������������������������������������������������������������������� 19
Check-in Policies������������������������������������������������������������������������������������������������������������������� 20
Lesson 1-5: Connecting to TFVC in VS Code������������������������������������������������������������������������������� 22
Summary������������������������������������������������������������������������������������������������������������������������������������ 26

Chapter 2: Working with Team Foundation Version Control: Part1������������������������ 27


Lesson 2-1: Exploring the Source Control Explorer��������������������������������������������������������������������� 27
Lesson 2-2: Setting Workspace Mode to Local and Server��������������������������������������������������������� 33
Local Workspace Mode���������������������������������������������������������������������������������������������������������� 36
Server Workspace Mode�������������������������������������������������������������������������������������������������������� 36
Lesson 2-3: Looking at Source Control Explorer Menu Items����������������������������������������������������� 37
Lesson 2-4: Editing and Checking In Your Changes�������������������������������������������������������������������� 38
Lesson 2-5: Resolving Conflicts During Code Check-­in�������������������������������������������������������������� 45

www.allitebooks.com
Table of Contents

Lesson 2-6: Viewing the History and Comparing the Changes��������������������������������������������������� 47


Lesson 2-7: Setting Source Control Tool Options������������������������������������������������������������������������ 50
Lesson 2-8: Deleting and Restoring Files����������������������������������������������������������������������������������� 52
Summary������������������������������������������������������������������������������������������������������������������������������������ 54

Chapter 3: Working with TFVC: Part 2�������������������������������������������������������������������� 55


Lesson 3-1: Using Shelvesets����������������������������������������������������������������������������������������������������� 55
Lesson 3-2: Suspending and Resuming Work����������������������������������������������������������������������������� 64
Lesson 3-3: Doing Code Reviews with TFVC������������������������������������������������������������������������������� 68
Lesson 3-4: Using Lock and Unlock�������������������������������������������������������������������������������������������� 76
Lesson 3-5: Applying Check-in Policies�������������������������������������������������������������������������������������� 78
Summary������������������������������������������������������������������������������������������������������������������������������������ 83

Chapter 4: Team Foundation Version Control Branching���������������������������������������� 85


Lesson 4-1: Creating a Branch���������������������������������������������������������������������������������������������������� 85
Lesson 4-2: Converting a Folder to a Branch������������������������������������������������������������������������������ 89
Lesson 4-3: Merging and Resolving Conflicts����������������������������������������������������������������������������� 91
Lesson 4-4: Tracking Changesets��������������������������������������������������������������������������������������������� 100
Lesson 4-5: Cherry-Picking Changesets����������������������������������������������������������������������������������� 103
Lesson 4-6: Exploring TFVC Branching Strategies�������������������������������������������������������������������� 106
Main Only����������������������������������������������������������������������������������������������������������������������������� 106
Development Isolation��������������������������������������������������������������������������������������������������������� 106
Feature Isolation������������������������������������������������������������������������������������������������������������������ 107
Release Isolation����������������������������������������������������������������������������������������������������������������� 107
Servicing and Release Isolation������������������������������������������������������������������������������������������ 108
Summary���������������������������������������������������������������������������������������������������������������������������������� 108

Chapter 5: Team Foundation Version Control: Command Line������������������������������ 109


Lesson 5-1: Getting Started with the Team Foundation Command Line����������������������������������� 109
Developer Command Prompt for Visual Studio�������������������������������������������������������������������� 109
Team Explorer Everywhere Command-Line Client�������������������������������������������������������������� 111

vi
Table of Contents

Lesson 5-2: Using Workspace Commands�������������������������������������������������������������������������������� 113


workspaces Command�������������������������������������������������������������������������������������������������������� 113
workspace Command���������������������������������������������������������������������������������������������������������� 114
Lesson 5-3: Running Various Commands���������������������������������������������������������������������������������� 117
get��������������������������������������������������������������������������������������������������������������������������������������� 118
add�������������������������������������������������������������������������������������������������������������������������������������� 120
checkin�������������������������������������������������������������������������������������������������������������������������������� 120
checkout (or edit)���������������������������������������������������������������������������������������������������������������� 121
rename�������������������������������������������������������������������������������������������������������������������������������� 122
undo������������������������������������������������������������������������������������������������������������������������������������ 122
Summary���������������������������������������������������������������������������������������������������������������������������������� 122

Chapter 6: Team Foundation Version Control: Security���������������������������������������� 123


Lesson 6-1: Setting Up TFVC Security at the Team Project Level���������������������������������������������� 123
Lesson 6-2: Applying Permissions at the Branch/Folder or File Level������������������������������������� 129
Lesson 6-3: Auditing Changes and Finding Out Who Did What������������������������������������������������� 134
Summary���������������������������������������������������������������������������������������������������������������������������������� 137

Chapter 7: Getting Started with Azure Git Repos�������������������������������������������������� 139


Lesson 7-1: Creating an Azure Git Repo������������������������������������������������������������������������������������ 139
Creating a Team Project with Azure Git Repos�������������������������������������������������������������������� 140
Creating Additional Git Repos in a Team Project������������������������������������������������������������������ 142
Lesson 7-2: Cloning an Azure Git Repo������������������������������������������������������������������������������������� 144
VS Code������������������������������������������������������������������������������������������������������������������������������� 144
Visual Studio������������������������������������������������������������������������������������������������������������������������ 145
Lesson 7-3: Creating and Pushing Code to Azure Git Repos���������������������������������������������������� 148
Lesson 7-4: Getting Changes from Others and Sharing Code��������������������������������������������������� 156
Lesson 7-5: Resolving Conflicts������������������������������������������������������������������������������������������������ 161
Lesson 7-6: Stashing the Changes������������������������������������������������������������������������������������������� 166
Summary���������������������������������������������������������������������������������������������������������������������������������� 170

vii
Table of Contents

Chapter 8: Branching with Azure Git Repos��������������������������������������������������������� 171


Lesson 8-1: Creating Branches������������������������������������������������������������������������������������������������� 171
Lesson 8-2: Working with Branches in Visual Studio and VS Code������������������������������������������� 174
Visual Studio������������������������������������������������������������������������������������������������������������������������ 175
VS Code������������������������������������������������������������������������������������������������������������������������������� 183
Lesson 8-3: Merging Changes and Resolving Conflicts������������������������������������������������������������ 185
Lesson 8-4: Using Pull Requests and Code Reviews���������������������������������������������������������������� 195
Lesson 8-5: Rebasing While Completing a Pull Request����������������������������������������������������������� 204
Summary���������������������������������������������������������������������������������������������������������������������������������� 206

Chapter 9: Using the Command Line with Azure Git Repos���������������������������������� 207
Lesson 9-1: Getting Started with the Command Line��������������������������������������������������������������� 207
Lesson 9-2: Cloning an Azure Git Repository and Pushing Code Using the Command Line����� 210
Lesson 9-3: Creating a Git Repository Locally and Pushing It to Azure Git Repos�������������������� 218
Lesson 9-4: Creating Azure Git Repo Branches Using the Command Line�������������������������������� 222
Summary���������������������������������������������������������������������������������������������������������������������������������� 224

Chapter 10: Azure Git Repos: Security����������������������������������������������������������������� 225


Lesson 10-1: Setting Azure Git Repos Permissions������������������������������������������������������������������ 225
Lesson 10-2: Setting Up Azure Git Repos Branch Policies�������������������������������������������������������� 234
Summary���������������������������������������������������������������������������������������������������������������������������������� 240

Chapter 11: Azure Git Repos Extras���������������������������������������������������������������������� 241


Lesson 11-1: Using Git Tags������������������������������������������������������������������������������������������������������ 241
Creating Tags with the Azure DevOps Web Portal���������������������������������������������������������������� 241
Creating Tags with Visual Studio����������������������������������������������������������������������������������������� 246
Creating Tags with the Command Line�������������������������������������������������������������������������������� 251
Lesson 11-2: Forking a Repo���������������������������������������������������������������������������������������������������� 255
Lesson 11-3: Importing from an External Repository��������������������������������������������������������������� 257
Lesson 11-4: Setting Up Azure Git Repos Markdown Files as a Wiki���������������������������������������� 260
Summary���������������������������������������������������������������������������������������������������������������������������������� 265

viii
Table of Contents

Chapter 12: REST APIs for Azure Git and TFVC Repos������������������������������������������ 267
Lesson 12-1: Using Repo REST APIs from a Browser to Retrieve Data������������������������������������� 267
Lesson 12-2: Creating a PAT to Use with REST APIs for Repos������������������������������������������������� 269
Lesson 12-3: Using the Repo REST APIs from Postman������������������������������������������������������������ 271
Lesson 12-4: Using the Repo REST APIs from PowerShell�������������������������������������������������������� 273
Summary���������������������������������������������������������������������������������������������������������������������������������� 276

Index��������������������������������������������������������������������������������������������������������������������� 277

ix
About the Authors
Chaminda Chandrasekara is a Microsoft Most Valuable
Professional (MVP) for Visual Studio ALM and a Scrum
Alliance Certified ScrumMaster, who focuses on continuous
improvement of the software development lifecycle. He
works as a lead engineer in DevOps at Xameriners (Pvt) Ltd,
Singapore. Chaminda is an active Microsoft Community
Contributor (MCC) who is well recognized for his
contributions in Microsoft forums, TechNet galleries, wikis,
and Stack Overflow, and he contributes extensions to Azure
DevOps Server and Services (formerly VSTS/TFS) in the
Microsoft Visual Studio Marketplace. He also contributes to
other open source projects in GitHub. Chaminda has published four books with Apress,
and he blogs at https://chamindac.blogspot.com/.

Pushpa Herath is an author, blogger, and speaker at


technical community events and works as a DevOps
engineer at Xamariners (Pvt) Ltd.
She has years of experience in DevOps with Azure
DevOps, Octopus, JIRA, and many other DevOps tools.
She is an expert on functional test automation using
Selenium and BDD. Pushpa blogs about technology at
https://devopsadventure.blogspot.com/. She has
published two books with Apress.

xi
About the Technical Reviewer
Mittal Mehta has 15 years of IT experience and currently is
working as a configuration manager. He also has eight years
of experience working in TFS, C#, Navision, build-release,
Azure DevOps, automation, and configuration in Microsoft
technologies.

xiii
Acknowledgments
We are thankful for all the mentors who have encouraged and helped us during our
careers and who have provided us with so many opportunities to gain the maturity and
the courage we needed to write this book.
We would also like to thank our friends and colleagues who have helped and
encouraged us in so many ways.
Last, but in no way least, we owe a huge debt to our families, not only because they
have put up with late-night typing, research, and our permanent air of distraction,
but also because they have had the grace to read what we have written. Our heartfelt
gratitude is offered to them for helping us make this dream come true.

xv
Introduction
Collaboration among developers is a vital aspect in software development. Sharing code
while working in teams to achieve software delivery goals increases end-user satisfaction.
Hence, source code control tools are essential for software development teams.
Azure Repos offers you both a centralized version control system and a distributed
version control system.

• Team Foundation Version Control (TFVC) is the centralized version


control system that comes with Azure Repos.

• Azure Git repos provide you with distributed version control and
support all the popular Git repo concepts.

Hands-on Azure Repos gives you step-by-step guidance on working with TFVC and
Git, while exploring best practices in each step. You will discover branching and merging
techniques to resolve conflicts while sharing code with teams as well as how to track the
changes you make to the code using repos. You will explore the essential command-line
options, REST API usage, and security options with hands-on lessons to give you the
ability to manage TFVC and Git effectively to support your teams. Additionally, code
review procedures for repos and integration of a repo with other Azure DevOps features
such as boards, pipelines, etc., are discussed in detail.
The hands-on steps in the book will provide you with a comprehensive
understanding, from the basics to advanced topics, as you go through each chapter.
Lessons comprise secrets to getting started quickly with Azure Repos in the right way
and integrating it with popular development tools such as Visual Studio, VS Code, etc.
The tips and tricks in the book will make you a productive developer and prevent you
from taking the wrong steps while using Azure Repos.
We hope Hands-on Azure Repos will be your go-to resource for delivering value to
your end users with software, using any platform and any language you prefer to use.

xvii
CHAPTER 1

Getting Started with


Azure Team Foundation
Version Control
Team Foundation Version Control (TFVC) is a centralized version control system for
your source code management. Generally, a team member will have one version of each
source code file on their machine while using TFVC. Branches of source code are based
on paths and get created on the server. A history of version control is maintained on
the source control server, not on the local developer machine. In TFVC you can apply
permissions at a granular level, and restrictions can be applied at the file level, which we
will discuss in Chapter 6.
In this chapter, we will explore the steps required to get started with TFVC in Azure
DevOps using Visual Studio. You will be able to understand how to set up a team project
to use TFVC or add a TFVC repo to an existing team project that is currently using Git
repos. The steps required to set up your machine to develop with TFVC using Visual
Studio will be described, and you will learn how to add new or existing solutions to TFVC
in Visual Studio. Further, this chapter will discuss the different workspaces available in
TFVC and the options to define and use code check-in (commit) policies. In addition,
using TFVC with other developer tools such as VS Code and Eclipse will be described for
you to get started even faster.

1
© Chaminda Chandrasekara and Pushpa Herath 2020
C. Chandrasekara and P. Herath, Hands-on Azure Repos, https://doi.org/10.1007/978-1-4842-5425-7_1
Chapter 1 Getting Started with Azure Team Foundation Version Control

L esson 1-1: Creating a Team Project with TFVC and


Adding a TFVC Repo to the Existing Team Project
We discussed how to create a new team project in Chapter 1 of the first book, Hands-­
on Azure Boards, of this book series. However, let’s take a quick look at creating a team
project with TFVC in this lesson to keep your experience seamless.
Prerequisites: You have an Azure DevOps organization created, and you have some
experience working with Azure DevOps to create team projects, or you have followed the
lessons in Chapter 1 of the book Hands-on Azure Boards.
Navigate to your Azure DevOps organization’s home page and click the “Create
project” button in the top-right corner. See Figure 1-1.

Figure 1-1. Creating project

In the team project creation pane, provide a name and select TFVC as the version
control system. You can set “Work item process” to whatever you’d like, as discussed in
detail in the Hands-On Azure Boards book. See Figure 1-2.

2
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-2. Creating a team project with TFVC

The created team project has TFVC set as the repo by default, and you can view it by
clicking the Repos menu option in the left menu. See Figure 1-3.

Figure 1-3. TFVC repo

Now, let’s look at how we can add a TFVC repo to an existing team project. Unlike Git
where multiple Git repos can be added to a single team project, you can have only one
TFVC repo per team project in Azure DevOps. Create a new team project with Git as the
version control system. Then navigate to Repos in the left menu. On the Repos tab, click
the drop-down next to the Git repo name and click “New repository.” See Figure 1-4.

3
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-4. Creating a new repo in an existing project

In the dialog that appears, select TFVC as the repo type and click Create to create a
new TFVC repo in a team project that already has Git repos. See Figure 1-5.

Figure 1-5. Creating a TFVC repo

In this lesson, we explored how to create a TFVC repo in an existing team project or
create a new team project with TFVC as the source control system.

4
Chapter 1 Getting Started with Azure Team Foundation Version Control

Lesson 1-2: Using Visual Studio Team Explorer


We created a new team project in the previous lesson with TFVC as the source control
system. As a next step, we need to connect it to Visual Studio to get started with the
source code development. In this lesson, let’s discuss the steps required to get Visual
Studio connected to your newly created team project in the TFVC repository, using the
Team Explorer window in Visual Studio.
Prerequisites: You have Visual Studio 2019 installed on your machine and are
familiar with working with Visual Studio. You have followed the steps in Lesson 1-1 of
this chapter and have a team project created with TFVC as the source control system.
In Visual Studio, to open Team Explorer, you can click View ➤ Team Explorer in the
menu or press Ctrl+\ and then Ctrl+M. The Team Explorer window lets you connect to
Azure DevOps. You can click the Manage Connection toolbar icon to go to the Manage
Connections page of the Team Explorer window. See Figure 1-6.

Figure 1-6. Managing connections in Team Explorer

5
Chapter 1 Getting Started with Azure Team Foundation Version Control

Click the Connect link or click the drop-down next to the Manage Connections link
(see Figure 1-6) and then click “Connect to a project.” In Team Explorer, the Manage
Connection page will open as a pop-up window. In the Connect to a Project dialog, you
can see the Azure DevOps organizations you have access to if you have already logged
in to Visual Studio with a Microsoft account or your organization’s account. You can
click “Add an account” or select a different account if you have connected more than
one account. See Figure 1-7. If you click “Add an account,” you will be prompted for
your credentials, and you can provide them to connect your Microsoft account or your
organization’s account to Visual Studio.

Figure 1-7. Adding or selecting an account

Log on from the account you used to create a team project in the previous lesson
and expand the Azure DevOps services organization to view your team projects
and repositories. If you are using an on-premises Azure DevOps server, you have
the option to provide an Azure DevOps server URL and connect it. In the expanded
view, select the TFVC repo you want to connect and click the Connect button. See
Figure 1-8.

6
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-8. Connecting a TFVC repo

Once the team project TFVC repo is connected, Team Explorer will allow you to map
the TFVC path of the project to a local folder and create a workspace. There are two types
of workspaces, and we will discuss them in Lesson 1-4. Provide a desired local path and
click the Map & Get button. See Figure 1-9.

7
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-9. Map & Get button

In this lesson, we discussed the steps required to connect and map a local path for a
TFVC repository using Visual Studio.

Lesson 1-3: Adding New/Existing Solutions to TFVC


Once we map the TFVC repository in Visual Studio, we are allowed to add new solutions
to version control using the Solution Explorer window of Visual Studio. Let’s look at the
steps to add a new solution to TFVC and how you can add an existing solution to TFVC
using the Solution Explorer window of Visual Studio.
Prerequisites: You performed the steps described in the first two lessons in this
chapter.
8
Chapter 1 Getting Started with Azure Team Foundation Version Control

In Team Explorer, you will see the New link, which allows you to create a new
solution. Click it. See Figure 1-10.

Figure 1-10. Creating a new solution

Then in the “Create a new project” dialog, search for console application, select the
.NET Framework console application, and click Next. See Figure 1-11.

9
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-11. Creating a console application

In the next step, provide a name for the project. Do not change the Location path as
the new solution is already being created in the mapped path of TFVC. Click Create to
create the new application. See Figure 1-12.

10
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-12. Creating the console application in the mapped source path

Once the new solution is created, view it in the Solution Explorer window of Visual
Studio. You can open Solution Explorer by pressing Ctrl+Alt+L or by clicking View ➤
Solution Explorer in the Visual Studio menu. If you have an existing solution that you
need to add to TFVC, copy all the content of the solution to the mapped local drive path
of TFVC and then open that solution in Visual Studio. Once you create/open a solution
in Visual Studio, go to the Solution Explorer window and right-click the solution you
want to add to TFVC. Then click Add Solution to Source Control in the context menu.
See Figure 1-13.

11
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-13. Adding the solution to source control

You will notice that all the files in the solution are marked with a +, indicating that
they are ready to be checked in (committed) to TFVC. See Figure 1-14.

Figure 1-14. Solution ready to be checked in


12
Chapter 1 Getting Started with Azure Team Foundation Version Control

Next open the Team Explorer window and click Pending Changes. In the Pending
Changes window of Team Explorer, you will be able to see the new solution files are ready
to be checked in. You can provide a comment and check in your code to TFVC. Further,
you can see the Related Work Items options allowing you to add a work item, which we
will discuss in Chapter 2. Note that there are some local file changes detected (this is
because of the default local workspace; we will discuss the difference between the server
and local workspaces that are available for TFVC in Lesson 1-4). See Figure 1-15.

Figure 1-15. Pending changes

Click the detected changes in the Excluded Changes section. A dialog will appear,
and you will be able to see the local files that should be ignored by source control. Select
all the files and right-click to open a context menu. In this window, you are allowed to

13
Chapter 1 Getting Started with Azure Team Foundation Version Control

promote files, which will be included as changes. Or you can ignore local-only files.
Since the files detected in this instance are local files, click “Ignore these local items.”
Note that several ignore options are available when you have selected a single file, the
same file extension, etc. See Figure 1-16.

Figure 1-16. Local changes

You will notice a new file is added to the included changes named .tfignore in the
pending changes. See Figure 1-17.

14
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-17. The .tfignore file added

Double-click the .tfignore file and inspect its content. The .tfignore file is used
to specify which files/paths should be ignored from TFVC. You can define the ignore
file patterns using wildcards. The .tfignore file contains a documentation header that
itself is a good explanation of how to use the file. Provide a comment in the Pending
Changes window and click the “Check in” button to commit the code to TFVC. In
the Solution Explorer, the files are now marked with a lock icon indicating they are
checked in to TFVC.

15
Chapter 1 Getting Started with Azure Team Foundation Version Control

In this lesson, we discussed how to get a solution added to TFVC using Visual
Studio’s Solution Explorer. Further, we looked at how to ignore local files from getting
checked in to TFVC using a .tfignore file.

L esson 1-4: Changing Settings for TFVC in


Visual Studio
There are a couple of settings you can set in Visual Studio to manage the behavior of
TFVC. They are divided into two levels: project collection settings that are applicable to
an Azure DevOps organization or a project collection in Azure DevOps Server and team
project settings that applicable in a team project scope.
You can access the project collection TFVC settings by clicking Team ➤ Team Project
Collection Settings ➤ Source Control. See Figure 1-18.

Figure 1-18. TFVC team project collection settings

F ile Types
The File Types settings let you define the enabled file types that can be added to
source control and the types that are prevented from being added to source control in
TFVC. See Figure 1-19.

16
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-19. TFVC File Types settings

W
 orkspace Settings
The default settings for workspaces can be set on the Workspace Settings tab of the
project collection’s source control settings for TFVC. See Figure 1-20.

17
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-20. Default workspace settings

Team Foundation Version Control comes with two modes of workspaces, namely,
local and server workspaces. By default, a local workspace is set up in Visual Studio
when you connect with TFVC. Let’s try to understand the difference between the local
and server workspaces in this lesson.

• Server workspace: In a server workspace, you can handle millions


of files per branch and even large binary files. The facility is there
to apply locks, which we will discuss in Chapter 3. Most of the
operations in the server workspace require the developer to be
connected to the TFVC server. The server workspace lets you set
“Enable get latest when checkout,” which will download the latest
version of a file when you start editing it. You should consider using
the server workspace when you have more than 100,000 items in your
workspace.

18
Chapter 1 Getting Started with Azure Team Foundation Version Control

• Local workspace: A copy of the latest version of code is available


on the developer’s machine so the developer can work offline with
the files. To check in code, the developer has to connect to the TFVC
server. You should consider using the local workspace when you
want to work offline often and easily restore locally deleted files. You
can compare, undo, check out and edit, rename, add, and delete files
easily in the local workspace mode.

We will discuss how to set the workspace mode for your development in Chapter 2.

Source Control Settings


To access the team project’s source control settings, you can click Team ➤ Team Project
Settings ➤ Source Control. See Figure 1-21.

Figure 1-21. Team project’s Source Control settings

C
 heck-Out Settings
When you click Team ➤ Team Project Settings ➤ Source Control, the Source Control
Settings dialog will open. The check-out settings let you define whether to enable
multiple check-outs of files for server workspace mode as well. By default, multiple
check-out is enabled for local workspace mode. Additionally, you can set the server
workspace mode to get the latest version of a file for a local machine when a file is
checked out. See Figure 1-22.

19
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-22. Check-out settings

C
 heck-in Policies
Check-in policies help you to add conditions to check in code so that you are able
to make the development team follow a given set of rules when submitting code
to TFVC. There are different types of check-in policies such as making a comment
mandatory, making the association of a work item to a given query mandatory, etc. We
will discuss how the check-in policies work in Lesson 3-5.

C
 heck-in Notes
Check-in notes allow you to define a note requirement for each check-in. Notes can be
set as optional or required. You can specify a note title and add a note as required or not
in team project’s Source Control settings. See Figure 1-23.

20
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-23. Check-in notes

If you try to edit a file and check in the code, you will be prompted to provide a
required note. See Figure 1-24.

21
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-24. Check-in notes in Pending Changes

In this lesson, we discussed project collection and team project TFVC settings that
can be used to control the behavior of how you work with TFVC.

Lesson 1-5: Connecting to TFVC in VS Code


Visual Studio Code is the lightweight cross-platform editor in the Visual Studio family. In
this lesson, let’s see how we can get VS Code connected to TFVC.

22
Chapter 1 Getting Started with Azure Team Foundation Version Control

Prerequisites: You have installed VS Code and are familiar with working with VS
Code. You must have a local workspace created for TFVC using Visual Studio or Eclipse
available on your machine. If you have followed the steps in Lesson 1-2, you should have
it already.
Open VS Code and press Ctrl+Shift+X, or click the cogwheel at the bottom-left
corner. Then click Extensions in the context menu to open the Extensions tab in VS
Code. See Figure 1-25.

Figure 1-25. Extensions

Search for Azure Repos to get the Azure Repos extension installed. Next locate the
tf.exe location of your machine. You can get tf.exe installed by installing Visual Studio
or by installing Team Explorer Everywhere from https://github.com/microsoft/team-­
explorer-­everywhere/releases. Team Explorer Everywhere supports macOS and Linux
as well, and you can install the command-line client to get tf.exe. https://github.
com/microsoft/team-explorer-everywhere contains the documentation on Team
Explorer Everywhere. If you have VS 2019 installed, you typically have tf.exe in the path
shown here:

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\


CommonExtensions\Microsoft\TeamFoundation\Team Explorer

23
Chapter 1 Getting Started with Azure Team Foundation Version Control

You have to go to VS Code File ➤ Preferences ➤ Setting and add a user setting as
specified here with your tf.exe path:

{ "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual


Studio\\2019\\Enterprise\\Common7\\IDE\\CommonExtensions\\Microsoft\\
TeamFoundation\\Team Explorer\\tf.exe", "tfvc.restrictWorkspace": true }

Open the Settings Editor for the Azure Repos extension, as shown in Figure 1-26.

Figure 1-26. Azure Repos extension settings

Then update the settings file with the user settings and the tf.exe path mentioned
earlier and save the settings file. Next open the local workspace folder containing the
TFVC repository in VS Code. Click View ➤ Command Palette and type team signin in
the command palette. See Figure 1-27.
24
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-27. Team sign-in

In the next two options provided, you can enter a personal access token (PAT) if you
have one. How to create a PAT was explained in Hands-On Azure Boards book. Let’s select
the option to authenticate and get an access token method, as shown in Figure 1-­28.

Figure 1-28. Authenticating TFVC in VS Code

Next copy the code provided and press Enter to authenticate. See Figure 1-29.

Figure 1-29. Starting the authentication

Provide the code and click Next in the opened browser prompt. See Figure 1-30.

25
Chapter 1 Getting Started with Azure Team Foundation Version Control

Figure 1-30. Entering code

Then provide your credentials and sign into the Azure DevOps organization when
prompted and close the browser after signing in. You will be able to see the connected
repo in the VS Code, and you can perform check-in and check-out operations with VS
Code. See Figure 1-31.

Figure 1-31. VS Code connected to TFVC

In this lesson, we explored the steps required to connect VS Code to the TFVC
repository.

S
 ummary
This chapter took you through getting started with Team Foundation Version Control.
We discussed setting up Visual Studio and VS Code to use with TFVC and explored a
few useful settings. Additionally, we identified how to add a solution via the Solution
Explorer window in Visual Studio to TFVC.
In the next chapter, we will discuss in detail how to use Visual Studio Source Control
Explorer to work with TFVC.

26
CHAPTER 2

Working with Team


Foundation Version
Control: Part1
We discussed how to create an Azure DevOps project and access the source code using
Visual Studio Team Explorer and Solution Explorer in the previous chapter. Now we have
an overall idea of how to create an Azure DevOps project with TFVC as the source control
system and how to connect to the project through Visual Studio Team Explorer. Hence,
we can discuss more about each important section of Team Explorer to get a clearer
idea of how to work with Team Explorer. One of the main windows of Visual Studio is
the Source Control Explorer window, which can be launched using Team Explorer. The
Source Control Explorer helps users to view and manage the source code of the project.
In this chapter, we will explore the Source Control Explorer in detail, and you will
learn about many features available in the Visual Studio Source Control Explorer.
Further, we will discuss how to check in your code changes, resolve code conflicts, and
set different source control tool options.

Lesson 2-1: Exploring the Source Control Explorer


The Source Control Explorer is used to view and manage the source code–related files
and settings of the project when you are using Team Foundation Version Control (TFVC).
Prerequisites: You followed the steps in Chapter 1. You have a solution and project
available in TFVC.
Go to Team Explorer of Visual Studio and connect to the Azure DevOps project, as
explained in Chapter 1. Select the Source Control Explorer. See Figure 2-1.

27
© Chaminda Chandrasekara and Pushpa Herath 2020
C. Chandrasekara and P. Herath, Hands-on Azure Repos, https://doi.org/10.1007/978-1-4842-5425-7_2
Chapter 2 Working with Team Foundation Version Control: Part1

Figure 2-1. Selecting the Source Control Explorer in Team Explorer

We will discuss all the important sections of the source control window in this
chapter. The main sections are the menu items, the folders, and the local path. See
Figure 2-2.

Figure 2-2. Source Control Explorer


28
Chapter 2 Working with Team Foundation Version Control: Part1

Go to the Folders section of the Source Control Explorer window. You will be able
to see that all the projects available in the Azure DevOps organization are listed in the
Folders section. As discussed in Chapter 1, you can map the entire organization or the
selected project with the local location. Right-click the mapped project. You will be able
to see the context menu with the various source control options. See Figure 2-3.

Figure 2-3. Source control options


29
Chapter 2 Working with Team Foundation Version Control: Part1

Let’s identify what we can do with each option in the context menu.

1. Open in File Explorer

We can navigate to the local source control folder where we


have mapped the source code. The workspace will open in the
Windows File Explorer after clicking this Open in File Explorer
menu item.

2. Get Latest Version

While we are working in our local source control, there can be


several changesets added to the source control in the Azure
DevOps server. So, we need to have a way to get the latest code
version on the server to our local source control folder.

3. Check Out for Edit

If we need to make any changes to the existing file of the project,


we need to check out the file first. You can open the selected file
for editing by using this option.

4. Delete

We can delete the selected file or the folder from the local source
control. We have an option to undo a delete as well.

5. Rename

We can rename the selected file or folder in the local source


control folder.

6. Move

We can move the selected file or folder.

7. Rollback

We can remove the changes in the selected changesets from the


local source control folder code and check in the pending changes
to apply the rollback.
8. Undo Pending Changes

We can undo the pending changes of the selected project files or


folders from here.
30
Chapter 2 Working with Team Foundation Version Control: Part1

9. Check in Pending Changes

We can make several changes in the local source control folder.


If the local changes are ready to go to the server, we can check in
the pending changes. Then all the pending changes will go to the
server.

10. Shelve Pending Changes

There may be situations where we are in the middle of an


implementation that is not completed. Hence, we can’t check
in those changes to the server. But we all know that if something
happens to our development machine, we will lose all the
pending work we have done. As a solution to this, we can keep our
incomplete code on the server using shelve sets. We will discuss
more about shelve sets in Chapter 3.

11. View History

We can open the history window where we can find all the
changeset details of the project.

12. Compare

We can compare the local work source control folder version


to the server version using this option. This allows you to select
which local version you want to compare to the server version.

13. New Folder


We can add a new folder to the selected project.

14. Add Items to Folder

We can add files to the selected folder using this option. After
selecting this option, a window will open where you can browse
and select the files to add to the project.

15. Branching and Merging


Development teams follow different branching strategies to
make their development work more organized. So, they are using
separate branches for feature development, as well as some
branches for testing purposes. At one point in development,
31
Chapter 2 Working with Team Foundation Version Control: Part1

teams merge these branches. Hence, we can create new branches


and merge the branches using this option when we use TFVC
as the source control system. Also, we can convert folders to the
branches with this option. We will discuss more about branching
with TFVC in Chapter 4.

16. Find

This is a search option available in source control. We can search


for labels, changesets, and shelvesets with this tool.

17. Advanced shows more advanced options. See Figure 2-4.

Figure 2-4. Source control advanced options

a. We can select the specific version and overwrite the local files.

b. We can lock the selected file and restrict the file editing by
another user.

32
Other documents randomly have
different content
For answer Gerald raced to the washstand and was soon splashing
busily, and in ten minutes they were flying down stairs with Spring in
their veins. Once off the stone walks it was gloriously soft and
“mushy,” as Dan said. They had to keep to the sod so as not to go
into the brown soil to their ankles. They crossed the bridge, waiting
there a minute to watch a long freight train rumble past beneath
them. A brakeman, sitting on a car roof, smoking his pipe, looked up
at them, grinned and waved as he went by. Then they took the
wood path and went down toward the beach, finding here and there
new evidences, if any were wanting, of the advent of Spring.
In the shaded places the snow, rotted and granular, still lay in little
banks fringed with ice. But tiny green spikes and leaves were
pushing their way through the litter of dead leaves, while, at the
edge of the beach, the grass in one sunny spot, was actually green.
Even the Sound seemed to look different. The water, reflecting the
clear sky, was as blue as sapphire. The sun shone radiantly on the
few white sails in sight. A steamer, far out, left a mile-long trail of
soft gray smoke behind it. A bird—Gerald declared joyfully that it
was a robin, but Dan contradicted it—sang sweetly somewhere
behind them in the woods. Dan began throwing stones into the
water from sheer exuberance of spirit. Then they hurried back to
school, racing half the way, and reached Oxford just in time for
Chapel. Even here the new influence was apparent; there was an
unaccustomed restlessness in evidence; fellows scuffled their feet
and glanced longingly toward the big windows which, partly opened,
let in the softly appealing scent of Spring. All that day fellows
lingered about the steps of the buildings and sighed when recitation
time came, and there was much talk of tennis and baseball and track
work. Two enterprising chaps got a canoe out of the boathouse in
the afternoon and paddled up the river.
And a week later Spring industries had really begun. In the
gymnasium the track and field candidates were going through the
preliminary work, the tennis courts were being rolled and raked and
mended, and in the basement of the gymnasium, inside the big
cage, the baseball candidates were toiling mightily. Although the
outdoor season for baseball at Yardley never opens until after Spring
recess is over, a full fortnight of indoor work precedes it. This indoor
work is in charge of the captain, for the coach doesn’t appear until
the candidates get out. This year there was an unusually large
number of entries for the team, and Captain Millener had his hands
full. Luckily, more than half of last year’s team remained in school,
and from these fellows Millener obtained assistance.
Stuart Millener was a tall, lanky, black-eyed First Classman, with a
shock of black hair and enough energy to run half a dozen baseball
teams. Millener had never distinguished himself in his studies, but he
had worked hard at them and had always managed to remain at
peace with the Faculty. He was a fellow who was now and always
would be better able to work with his hands than with his brain. And
there are plenty of places for that sort in the world. As a first-
baseman he was a huge success, and there seemed no reason why
he should not turn out to be an excellent leader. He was highly
popular and fellows believed in him. The Kingdon Gymnasium at
Yardley is still one of the finest in the country and its baseball cage is
roomy and light. Here every afternoon from half-past three until
after five the baseball candidates practised. Fifty-seven fellows
reported for work, and they were divided into three squads and each
squad was given a half-hour’s work. There was five minutes’ hard
work with the dumb-bells for all hands as a starter, and then the
pitchers got busy under Colton’s direction, and Millener and his
assistants looked after the batting and fielding. In order to leave the
cage free for the latter branches of the art of baseball, the pitchers
and catchers used the bowling alleys upstairs. Fielding practice was
confined to the handling of grounders and slow hits, but there was
plenty of room in the cage for this work, as well as for throwing and
sliding to bases.
Dan was one of the first candidates to report and during the two
weeks that intervened between that time and the beginning of
Spring recess he toiled hard and enthusiastically. At home, on his
school team, he had played at second base and had never had any
trouble in keeping his place. How he would compare with the other
claimants for infield positions here at Yardley remained to be seen,
but Alf declared that he was sure to make the nine, if not as a
baseman, at least in the outfield.
Gerald, long since released from probation, had bothered Mr.
Bendix, the Physical Director, until that autocrat had given Gerald
another examination, had congratulated him on his physical
improvement and had finally grudgingly given him permission to play
class baseball. And Gerald was mightily pleased. He bought a book
of rules over in Greenburg and read it through from one blue cover
to another, and asked so many questions that Dan’s head was in a
whirl half the time. When Spring recess began Gerald was without a
doubt the best read youth in school on the subject of baseball.
Spring recess and the month of April began almost together. Of
the former there was to be just a week. Gerald’s father, writing from
Berlin a fortnight before, had suggested that the two boys spend the
vacation in New York. Both Gerald and Dan were delighted at the
idea. Had it not been for this invitation Dan would have had to
spend the recess at school, since it was hardly practicable to journey
out to his home in Ohio for so short a time. He wrote to his father
and received permission to accept Gerald’s hospitality. And with the
permission came something quite as welcome, a check for ten
dollars.
“You’ll want some money to spend,” wrote Mr. Vinton, “and so I
enclose herewith check for ten dollars. You mustn’t let your friend
pay for everything, you know. Have a good time, and write and tell
us what you do in New York. Your mother says you are to be very
careful about crossing streets and riding in the subway. I say the
same. The papers are full of accidents to folks in that town. You
must try and get young Pennimore to come out and visit you this
summer. It won’t do to let him do all the entertaining. If you think
well of this, I will write to Mr. Pennimore about it when the time
comes. Your mother and sister send their love. Your mother will
write Sunday. Mae says I’m to tell you to send her lots of postcards
from New York, and they must be colored ones, and you are to write
on them all. My regards to Gerald. Your loving father.”
“I’d just love to go out and visit you,” said Gerald, when Dan read
that portion of the letter to him, “but I don’t suppose father will let
me. He will be afraid that the Indians will get me.”
“Oh, the Indians are quite peaceable in Graystone now,” laughed
Dan. “You just show your father that you know how to look after
yourself, and I guess he will let you go. Why, a year ago he wouldn’t
have thought of letting you stay in New York with just the servants,
Gerald!”
“That’s so! But he thinks you’re so grand, Dan; I guess that’s why.”
“Well, I’ll be just as ‘grand’ next summer,” replied Dan cheerfully.
“I’ll bet he will let you go. If he does, we can have a dandy time at
home.”
But meanwhile they were looking forward to a dandy time in New
York. And they had it. When they arrived at the house there was a
good dinner awaiting them, a dinner which Mr. Pennimore’s chef
fashioned for the delectation of two hungry boys. Strange soups and
unpronounceable entrees and fancy dishes in general were omitted,
and all the time they were there they had just the sort of things they
liked. They were not, all of them, the things usually prescribed for
schoolboys, however, and if Spring recess had lasted two weeks
instead of one, it is probable that they would have had to go under
the doctor’s care.
“Gee!” exclaimed Dan on one occasion, “this cream pie is simply
swell, Gerald! I suppose if I make the baseball team I’ll have to go in
training. So I’m going to make the most of my chances now.”
“So am I,” replied Gerald. “There won’t be much more pie for us
after we get back, will there?”
“Oh, you won’t have to train if you make the class team,” said
Dan. “It’s just the Varsity, you know.”
“Won’t I?” asked Gerald disappointedly.
“Well, I guess I’ll go in training, anyway. It’s good for you.”
Those were seven splendid days, and yet when the last one came
neither of the two was sorry. Theaters and picture galleries and
drives and walks were jolly enough, but, as Gerald sagely remarked,
a fellow soon gets tired of them.
“I’d a heap rather play baseball or tennis than go to the theater,”
said Gerald. “Wouldn’t you?”
Dan replied that he would, but he said it hesitatingly, for theaters
and such things were more of a novelty to him than to Gerald. But
he was quite as contented as Gerald when the train set them down
at Wissining again. They went over to Dudley after dinner and called
on Alf and Tom. Every one talked vacation for a while, and then the
conversation turned to baseball and school sports.
“Payson’s coming next Monday,” announced Alf. “I saw Millener a
while ago. He said that if the ground dries up enough we’ll get out
on the field the first of the week.”
“Well, it’s soppy enough now,” said Dan. “And it looks like rain
again.”
“Is Payson the coach?” asked Gerald.
“Yes,” Dan replied. “You remember him last Fall, don’t you? The
chap that coached the football team?”
“Oh! Does he coach in baseball, too?”
“You bet he does!” said Alf. “And he’s a dandy, too. He used to
catch for Cornell when he was there, and they say he was the best
ever. By the way, Gerald, Dan says you’re going in for baseball.”
“Yes, Mr. Bendix said I might. Do you think I’ll stand any show for
the Fourth Class team, Alf?”
“Ever played much?” Gerald shook his head sadly.
“I never played at all in a game. But I can throw a ball pretty well
and catch; and I can bat a little. I had a tutor last year who used to
play with me, and he said I did pretty well.”
“I dare say you’ll do as well as most of them,” said Tom. “Don’t let
them think you’re a duffer, though; put up a front; tell ’em you’re
one of the finest young baseball players that ever struck the Hill.”
“I guess they wouldn’t believe that,” laughed Gerald. “Don’t you
play, Tom?”
“Baseball? I rather guess not! It’s a silly game.”
Alf laughed maliciously.
“No,” he said, “Tom doesn’t care for baseball, especially the
batting part of it, do you, Tom?” Tom growled.
“You see,” Alf continued, smiling reminiscently, “Tom went out for
the team last Spring. They thought he was big enough to be
promising material. So Payson let him stay on a while. One day, just
after we got out of doors, we had batting practice at the net. Colton
was pitching. You know, he has about everything there is, Colton
has, and he thought he’d have some fun with Tom. So the first ball
he sent Tom swiped at so hard that he fell over himself and tumbled
into the net.”
“Didn’t either,” laughed Tom.
“That made him mad. So he spit on his hands, got a good grip on
the bat, and tried the next one. That was an in-shoot, and Tom
didn’t know it. It took him plumb in the ribs. We all laughed at that,
and Tom got madder than ever. ‘Put it where I can hit it!’ he yelled
to Colton. ‘I dare you to!’ So Colton did it, but he sent it so fast that
Tom didn’t see it until it was by him.”
“It was over my head,” protested Tom, indignantly.
“Then Colton just let himself loose, and the rest of us, standing
around waiting for our turns, just laughed ourselves sick! Once Tom
lost hold of his bat, and it went about fifty feet into the field, just
missing Colton by a foot. Another time Tom reached out so far that
he fell on his face. Then another in-shoot took him in the arm, and
that was enough. Tom threw down the bat and walked off.
“‘Here, where are you going?’ asked Payson.
“‘Home,’ said Tom. ‘What’s the good of standing up there and
letting him slug me with the ball? I’ve got a smashed rib and a
busted shoulder, and that’s all I want. I’m no hog!’”
“It makes a good story, the way he tells it,” said Tom, when the
laughter had ceased. “It’s a fact, though, that he did give me two
awful whacks with that fool ball. Pshaw, I couldn’t hit it in a
thousand years! I knew that, so I got out. Afterwards I tried to get
Colton to stand up at the net and let me throw a few balls at him,
but he wouldn’t do it. I told him he could have all the bats he
wanted, too, but that didn’t seem to satisfy him.”
“I’ll bet you couldn’t have hit him,” jeered Alf.
“Couldn’t I? If he’d let me try he’d have gone to the hospital!”
“But you’re on the Track Team, aren’t you?” Gerald asked.
“Yes. There’s some sense to that.”
“Tom’s happy if you give him a sixteen-pound shot or a lump of
lead on the end of a wire,” said Alf. “He won eight points for us last
Spring. But you ought to see the crowd scatter when he gets
swinging the hammer around.”
“Oh, you dry up,” said Tom.
“Fact, though,” laughed Alf. “Once last year when he was
practising, the blamed thing got away from him and tore off about
ten feet of the grandstand. Andy Ryan said it was a lucky thing the
framework was of iron, or else he’d have smashed the whole stand
up.”
“You fellows are having lots of fun with me,” growled Tom, good-
naturedly, as he arose and took up his cap, “and I hate to spoil your
enjoyment, but I promised to look up Rand this evening.”
“That’s all right,” Dan assured him, “we can have just as much fun
with you when you’re not here.”
“Well, what you don’t know can’t hurt you. By the way, Gerald,
want to come around to Oxford with me Saturday night? We’ve got a
fellow coming over from Greenburg after the debate to do some
sleight-of-hand for us.”
“I’d like to,” replied Gerald, “but—” He glanced anxiously at Dan
and Alf.
“Sure,” said Alf. “Go ahead. We’re glad to have you. The more you
see of Oxford, the better you’ll like Cambridge. You see, Gerald, the
only way they can get the fellows to attend Oxford is by supplying
them with vaudeville entertainments. In another year or so they’ll
have to have brass bands and free feeds if they want fellows to go
there!”
“That’s all right,” replied Tom. “We know who won the last debate.
I’ll call around for you Saturday, Gerald, if I don’t see you before.
Good night.”
“We gave it to you!” shouted Alf as the door closed behind his
chum. “Why you haven’t got a debater in your whole society.” But
the challenge was wasted, and Alf turned to Dan. “We’ll have to win
the debate this Spring,” he grumbled, “or there won’t be any living
with Tom!”
CHAPTER XIV
POLITICS AND CHESS

Payson appeared on Monday and took up his lodgings in the


village. But, as events proved, he might just as well have delayed his
arrival for another week, for on Sunday morning it began to rain as
though it meant to flood the country, and it continued practically
without interruption until Wednesday night. By that time the river
was over its banks, Meeker’s Marsh was a lake, the athletic field was
like a sponge, and outdoor practice was impossible. The work in the
cage went on, but the fellows were getting tired of it, and longed for
sod under foot and sky overhead. Payson didn’t waste that week, by
any means, but, with the first game only a fortnight off, the enforced
confinement to the gymnasium was discouraging.
John Payson was about thirty years of age, and weighed in the
neighborhood of two hundred pounds. He was large, broad-
shouldered, and, in spite of his weight, alert and quick of movement.
He had played baseball and football in his college days, first at
Cornell, and later, as a graduate student, at Yale. “Whopper” Payson
was his name in those days, and for two years he had made the All-
America Football team as a guard. While at Cornell he had caught
for two years on the Varsity Baseball nine, and they still remember
him there as one of the best. During his five years as coach at
Yardley he had helped at three football and two baseball victories
over Broadwood. It would be an exaggeration to say that Payson
was universally popular at Yardley. He was a good deal of a
martinet, had a quick temper and a sharp tongue. But he was just in
his dealings with the fellows, was a hard worker, and as unsparing of
himself as of his charges. The older boys, those who had known him
longer, liked him thoroughly, while the younger fellows, many of
whom blamed him for their inability to make the teams, called him
hard names.
The baseball candidates finally got out of doors a week later than
expected. By this time the April sky appeared to have emptied itself
of rain, and a warm sun was busy drying up the sodden land. The
fellows felt and acted like colts that first afternoon. It was bully to
feel the springy turf underfoot, to smell the moist fragrance of
growing things, and to have the west wind capering about the field.
Even a full hour and a half of hard work failed to quench their spirits,
and they swarmed into the gymnasium at half-past five as jolly as
larks. The next afternoon practice ended with a four-inning game
between the first and second teams, and Dan played during two of
the innings in center-field. He had but one chance and accepted it.
At his single appearance at bat he got to first on fielder’s choice,
having knocked a miserable little hit half way to third base, and was
caught ingloriously in an attempt to steal second. And yet he could
congratulate himself on having made as good an appearance as any
of the other dozen or so candidates for fielding positions. By the
middle of the week practice had settled down to hard work, and on
Friday the first cut was made. Some twenty candidates were
dropped from the squad, only enough being retained to compose
two nines and substitutes. Dan found himself on the second nine,
playing when the opportunity offered at right or center-field. But he
felt far from secure, for it was well known that a further reduction of
the squad was due some time the following week.
Meanwhile Gerald had astounded Dan and the rest of his friends,
not yet many in number, by winning a place on the Fourth Class
team. I think Gerald must have been a natural-born baseball player,
if there is such a thing; otherwise he would never, with his slight
experience, have made the showing he did. Perhaps the standard of
excellence required of a candidate for admission to the team wasn’t
very high, but there were many fellows amongst those trying for
places who had played ball for two or three years. Gerald showed
unsuspected alertness in handling the ball, accuracy in throwing, and
a good eye at the bat. And so, a week after the class teams had
begun work, Gerald found himself playing shortstop on his nine.
Naturally, he was in the seventh heaven of bliss, and talked baseball,
thought baseball, and dreamed baseball. Alf amused Dan and Tom
by claiming some of the credit. Personally, I think there was reason
in his contention. At all events he made out a good case.
“Oh, you may laugh,” said Alf earnestly, “but it’s so. If Gerald
hadn’t had those boxing lessons he wouldn’t have made good. They
taught him to see quick and act quick, and they taught him
accuracy. When you come to think of it, boxing and baseball aren’t
so much unalike. In boxing you have a fellow’s glove to stop and
your own to get away, and get away quick and accurately. In
baseball you have the ball to stop and to get away. In either case it’s
quickness and accuracy of eye and brain and body that does the
trick.”
“Pooh!” scoffed Tom. “If Gerald ever gets to be President you’ll try
to show that it was because you gave him boxing lessons when he
was a kid.”
But whether or not part of the credit was due to Alf, it remains a
fact that Gerald was about the proudest and happiest youngster in
the whole school, with only one thing to worry him. That thing was
the fact that devotion to baseball was playing hob with his lessons.
It was Kilts who first drew his attention to the fact. He asked him to
remain behind the class one morning.
“What’s wrong, lad?” he asked kindly. Gerald hesitated a moment,
trying to find a plausible excuse. In the end he decided that the
truth would do better than anything else.
“It’s baseball, sir,” he answered frankly. “I’m on my class team,
and—and I guess I haven’t been studying very hard.”
“Well, well, that won’t do,” said Kilts gravely. “Baseball is a fine
game, I have no doubt, but you mustn’t let it come between you
and your studies, lad. Better let baseball alone a while, I’m thinking,
until you can do better work than you’ve been doing the last week.
Baseball and all such sports belong outdoors; they’re well enough
there; but when you take them into class with you—” Kilts shook his
head soberly—“you’re brewing trouble. You know I’m right, don’t
you?”
“Yes, sir,” Gerald answered. “I’ll try and—and do better.”
“That’s the lad! Youth must have its pleasures, but there’s work to
do, too. Ye ken what Bobby Burns said?

“‘O man! while in thy early years,


How prodigal of time!
Misspending all thy precious hours,
Thy glorious youthful prime!’

“He was no the hard worker himself, was Bobby,” added Mr.
McIntyre with a chuckle, “but he sensed it right, I’m thinking. Well,
run along, lad, and remember, I’m looking for better things from
you.”
So Gerald ran along, just as the next class began crowding into
the little recitation room, and when study time came that evening,
instead of leaning over his books with one hand in a fielder’s glove,
as had been his custom of late, he put glove and ball out of sight
behind a pillow on the window seat before he sat down. Dan saw,
and breathed easier.
The second cut in the Varsity squad came, and Dan survived it.
The first game, a mid-week contest with Greenburg High School,
found the Yardley team somewhat unprepared. Kelsey, a second
string pitcher, was in the box and was extremely erratic. Greenburg
had no difficulty in connecting with his delivery, and the Yardley
outfield was kept pretty busy during the six innings which were
played before a sharp downpour of rain sent the teams and
spectators scurrying from the field. Dan didn’t get into the game,
much to his regret, for there were lots of chances for the outfielders
that afternoon. Yardley managed to pull the game out of the fire in
the fifth inning, and won, 8-6.
So far Dan had not flaunted his ambition to play on one of the
bases. But the following Monday he found himself sitting on the
bench beside Stuart Millener. Millener was watching the base-
running practice, his place on first being occupied for the time by a
substitute. He asked Dan where he had played before, and learned
that at Graystone Dan had occupied second base.
“Well,” said Millener, “Danforth is making pretty good at second,
and unless something happens, he will stay there, I guess. But
there’s no harm in being prepared, Vinton, and I’ll let you see what
you can do there.”
Millener was as good as his word, and when practice began Dan
found himself in Danforth’s place. Of course, he was rusty, and he
and Durfee, shortstop, failed to work together at first. But he made
no bad plays, and shared in a speedy double with Millener. At the bat
Dan was still rather weak. After practice Payson called him.
“You’ve played on second before, Millener says, and so I’m putting
you down for a substitute baseman, Vinton. You’d rather play there,
wouldn’t you?”
“Much,” answered Dan. “But I’d rather make good as a fielder
than try for a base and not make it.”
“Well, you see what you can do. I don’t believe you’ll have much
show for second, but you might possibly make third. Ever play
there?”
“No, sir, but I guess I could.”
“Well, we’ll see. You want to be a little shiftier on your feet,
though, Vinton. You haven’t got as much time to make up your mind
in the infield as you have in the out.”
Dan told Alf of his promotion while they were dressing in the
gymnasium.
“That’s good,” said Alf. “I guess Payson means to get you on third.
Condit isn’t much; Lord beat him out for the place last year, and
would have had it this if he’d returned. I guess Payson thinks he
owes you something for pulling us out of the hole in the Broadwood
game last Fall.”
“Oh, well, I don’t believe I want to get it that way,” said Dan
thoughtfully.
“What way?”
“I mean I don’t want to get it by favor.”
“Piffle! Don’t you worry. If you get it, it’ll be because you deserve
it. Payson may help you, Dan, but you needn’t worry about having
the place presented to you on a plate. Payson isn’t that sort. He
never lets his liking for a fellow influence him much. I rather wish he
did. He and I are pretty good friends, and I’d rather like to play
shortstop. But nothing doing.”
“It doesn’t seem exactly fair for me to step into the infield when
you’ve been on the team two years,” said Dan.
“Pshaw, I was only fooling! I’m happy enough out in left field.
Why, I couldn’t play short for a minute. I’ve tried it. I can catch flies
and throw to base pretty well, but if it wasn’t for the fact that I can
bat with the next fellow I wouldn’t hold down my place a minute. I
know some schools where you can have almost anything in reason if
you happen to be football or baseball captain. But the rule doesn’t
work that way here. Millener couldn’t have made the scrub last fall,
and he knew it, and didn’t try. And I know that the only thing that
keeps me on the nine is the fact that I bat better than any one
except Colton. Oh, you have to work for what you get at Yardley. A
good thing, too. Over at Broadwood they have about half a dozen
societies and society men have the first choice every time.
Considering that, it’s a wonder they do as well as they do.”
“I should say so,” agreed Dan. “It’s about a stand-off in athletics,
isn’t it?”
“It’s run pretty evenly the last ten or twelve years in baseball and
football,” replied Alf, “but we win three out of four times in track
games. And we’re away ahead in hockey, in spite of this year’s fizzle.
They usually do us up at basket-ball, though. But who cares about
basket-ball, anyway—except Tom?”
“I should think we’d go in for rowing here,” said Dan.
“Well, there isn’t a decent course within a good many miles,” said
Alf. “I don’t believe Yardley ever tried rowing. The year before I
came here they had an ‘Aquatic Tournament,’ whatever that is;
Broadwood came over and there were canoe races and swimming
races and diving stunts on the river. But Broadwood got so
everlastingly walloped that there wasn’t much fun for any one and it
was never tried again.”
A little later, on the way across the Yard, Dan said:
“By the way, Alf, Cambridge sends out invitations in about two
weeks. I want to get Gerald in, if I can. How do you feel about it?”
“Me? Why, I’ll help, of course. Gerald’s not a bad little chap, not by
any means. I guess we can make it go all right. We’ll have to do a
little political work, though. I wonder whether he’d rather join
Cambridge than Oxford. He and Tom get on pretty well together, you
know, and Tom’s had him up to Oxford twice.”
“I think he will take Cambridge if he gets a chance,” Dan replied.
“I’m going to take him again Saturday night. I suppose we’d better
talk him up with the fellows.”
“Yes. I guess we’re certain of five or six votes already. And we can
get that many more without much trouble.”
“Just what is the method of selecting fellows?” asked Dan, as they
came to a pause at the doorway of Dudley.
“You get a majority of the meeting to agree on the candidate,
first. Then his name is put down on the list, and the list goes to the
Admission Committee. The Committee is composed of the President
and two members from each class of the three upper classes, seven
in all. They vote on the names as they’re read off. One black ball
keeps a fellow out.”
Dan whistled softly.
“That doesn’t sound so easy,” he said.
“Oh, I guess we won’t have any trouble. I know most of the
Committee. Colton’s president, you know; he will vote the way I ask
him to. Then there’s Millener and Kapenhysen of the First Class, both
good chaps; and Chambers and Derrick of the Second. Chambers
will vote for Gerald anyway without asking, and Derrick is a
particular friend of Tom’s, and will do as Tom says. The Third Class
men—blessed if I know who they are; do you?”
Dan shook his head.
“Well, I’ll find out to-morrow,” said Alf. “Don’t you worry, we’ll get
little Geraldine in all right. By the way, why didn’t you come over to
the gym Saturday morning? We had a lively little bout, I tell you. I
guess it will be the last for a while, too. Now that practice has begun
neither Gerald nor I seem to have much time for punching each
other’s noses. Well, be good, Dan. Come around to-night if you can.”
Dan was too busy to call that evening, but the following night
found him and Gerald in Number 7. For some time past Tom had
been teaching Gerald chess, and to-night the board was brought out
and the two were soon deep in the game. Dan and Alf had been
talking baseball, but after a while Dan interrupted to ask:
“By the way, did you find out about that?”
“About—? Oh!” Alf looked rather queer, as he drew a slip of paper
toward him and scribbled two names on it. “Yes, I found out this
morning. Here they are.” He pushed the slip across to Dan. Dan read
and returned Alf’s look with one of frowning surprise.
“Hm,” he said.
“Just so,” returned Alf dryly.
“Do you think—” began Dan. Alf shrugged his shoulders.
“Blessed if I know. I thought you might.” He looked hesitatingly
over at Gerald’s bowed head. “Perhaps—?”
Dan nodded.
“I say, Gerald,” said Alf, “I hate to interrupt that absorbing game
of yours, but would you mind telling me how you and your friend
Arthur Thompson are getting on these days?”
Gerald looked blank for a moment.
“Thompson?” he repeated. “Oh! Why, we always nod when we
meet each other. We’ve never spoken since the night of the snowball
fight. Why, Alf?”
“I was just wondering,” replied Alf vaguely. “I wondered whether
you were friends or not. Does he seem inclined to be decent?”
“We-ell, he hasn’t tried to be smart with me,” answered Gerald.
“But I don’t think he cares for me much. And I’m pretty sure I don’t
like him.”
“I see. And do you know a fellow named Hiltz, Jake Hiltz, a Third
Class fellow; lives in Whitson?”
Gerald shook his head.
“I don’t think so. I may know him by sight. Ought I to know him,
Alf?”
“N-no, I guess not. I don’t believe he would prove much of an
addition to your visiting list.”
“Your move, Gerald,” said Tom.
When the players were absorbed again, Alf said:
“It doesn’t look so easy now, does it?”
Dan shook his head. “No, it looks rather bad.”
“I think maybe Tom had better work his end,” suggested Alf.
“Know what I mean?”
“Oxford?” asked Dan.
“Yes, we wouldn’t want him to miss them both, eh? I’ll speak to
him about it to-night. Maybe he means to anyway, he’s taken quite a
shine to—someone.”
“All right,” said Dan. “I’m sorry, though. I don’t suppose there is
anything I could do with—” He tapped the slip of paper.
“No, he’d probably resent it, as you don’t know him. Besides, we
don’t know that he will object. It may go through all right. But if I
were you I’d speak to—you know who, and tell him how it stands.
Perhaps he will have a chance to smooth things over with
Thompson.”
“I can’t quite imagine him doing it,” replied Dan, with a smile.
“He’s more likely to punch his head, if only to make use of what
you’ve taught him.”
“Well, we’ll see the thing through, anyway,” answered Alf
hopefully. “We’ll get his name up to the Committee. After that—well,
it’s past us. But if G could make it up with T, I guess he’d go through
all right.”
“He never would, though. Still, I’ll suggest it to him when we go
back.”
“Got you,” said Tom quietly.
“How? Why?” asked Gerald, studying the board perplexedly. “Why
can’t I move—.” He stopped. Then: “O-oh!” he said expressively. Dan
and Alf laughed.
“Beat you again, did he?” asked Dan. Gerald nodded, smiling
somewhat sheepishly.
“Don’t you care, Gerald,” said Alf. “Tom is really a pretty neat little
chess player. I dare say there isn’t more than one fellow in school
who can beat him, and modesty forbids my mentioning that fellow’s
name.” Tom snorted. “Chess is a fool game, anyway; a game for
children and idiots.”
“Don’t you play?” asked Gerald innocently.
“Play?” answered Alf above the laughter. “Well, you just ask Tom
who wins when we play together.”
“Yes, ask me,” said Tom dryly. “Checkers is your game, Alf.”
“Oh, I’m not saying I can’t do pretty well at that, too, but when it
comes to chess—well, again my inherent modesty forbids me to
pursue the subject.”
“Huh! You don’t know a king from a pawn,” jeered Tom.
“That’s a challenge,” replied Alf. “Let me at him, Gerald. Just you
fellows watch if you want to see pride humbled and a haughty spirit
destroyed. Let me see, Tom, where do I put these things?”
“I guess we’ll have to be going,” laughed Dan, “although I can see
that it is going to be a rare battle.”
“Rare?” repeated Alf, with a grin. “Oh, no, not rare, Dan; I’m going
to do him to a turn. Move, Tom, but be careful how you do it.
Remember that I have my argus eye on you. Here! You can’t do
that! Of course you can’t. Did you see the way he moved, Dan?
That’s cheating, sure! Here, where are you fellows going?”
“Home, before the trouble begins,” answered Dan. “Come on,
Gerald.”
“Trouble! There isn’t going to be any trouble,” said Alf. “This is
going to be the easiest thing I ever did. But if you must go, see you
to-morrow. Gee, he’s pinched my knight!”
CHAPTER XV
THE LISTS ARE POSTED

Back in Clarke, Dan and Gerald spread out their books on opposite
sides of the table for an hour or more of study. Gerald was keeping
his promise to Mr. McIntyre, and was really doing the best he was
capable of at algebra. But it did seem as though Fate was against
him, for, in order to do full justice to mathematics, he had to give
less time to his other studies, with the result that his French had
been suffering of late, and Mr. Von Groll had once or twice showed
impatience. It seemed desperately hard to please everyone, thought
Gerald.
Across the table Dan browsed through his morrow’s Latin, and
then settled down to geometry. Now and then Gerald interrupted to
ask assistance, and once Dan reached over for the younger boy’s
book and puzzled out a line in Cæsar’s Gallic War for him. Nine
o’clock struck, and Gerald looked up from his book with a sigh,
glanced hopefully at Dan, found that youth still absorbed, and, with
another sigh, went back to work. But ten minutes later Gerald
pushed his book resolutely away, yawned, stretched, and spoke.
“I wish this universal disarmament they talk about nowadays had
been a fact about 50 B. C.,” he said regretfully.
“Yes? Why?” asked Dan, looking up.
“There wouldn’t have been any Gallic War, and I wouldn’t have to
read about it.”
“Well,” said Dan, “you’d better not let Collins hear you put the date
of the Gallic War as 50.”
“Oh, well, it was around there somewhere,” answered Gerald
indifferently. “What’s the good of being particular about the date of a
thing that took place thousands of years ago? I never could
remember dates, anyway. I guess I’m only sure about three.”
“And what are those?” asked Dan, closing his books and piling
them in place.
“My birthday, the day they fired on Fort Sumter, and the date of
the Third and Fourth Class baseball game.”
Dan laughed. “You want to be careful and not overtax that brain
of yours, Gerald,” he said. Then: “That reminds me,” he said more
seriously. “There’s going to be a good debate Saturday evening.
Want to go along?”
“Yes, thanks, I’d like to very much.”
“Cambridge and Oxford take fellows from the Fourth Class in a
week or two,” continued Dan. “Have you made up your mind which
you want to join?”
“Cambridge,” answered Gerald promptly. “They both seem very
nice, but you and Alf are both in Cambridge, and—and I think I’d
rather go there—that is, if I can. Do you think I can?”
“That’s what I want to talk about,” replied Dan, pushing back his
chair and clasping his hands behind his head. “You see, the Society
holds a meeting—it’s a week from Friday—and takes up the names
of the fellows in order. If a majority of the fellows there are in favor
of the chap his name goes to the Admission Committee. That
committee is made up of the President and two members from each
of the three upper classes, that is, seven members in all. They pass
finally on the candidates for admission, and a candidate has to get
the whole seven votes to receive an invitation. Understand?”
“Yes,” answered Gerald anxiously.
“Well, we can get you past the meeting all right, Gerald, and we’re
pretty certain of five of the seven on the Committee, but the other
two, the Third Class members, are rather more difficult. Neither Alf
nor I know them very well. One is a chap named Hiltz and the other
is this fellow Thompson.”
“I guess that queers me, then,” said Gerald mournfully.
“You think Thompson would vote against you?”
Gerald nodded. “I’m pretty sure he would.”
“But he said awhile ago, didn’t he, that you and he were quits?”
“Ye-es, but I don’t think he meant it. He doesn’t like me, I know.”
“Well,” said Dan hesitatingly, “Alf suggested—in fact, I think so,
too, that you might sort of let him understand that you are ready to
be friends. It won’t be necessary to say very much, I guess; you
might just speak to him when you see him, and then, if you have the
chance, get into conversation with him. It wouldn’t be hard.”
“I’d rather not get into either society than do that,” declared
Gerald vehemently. “And—and I don’t believe you’d do it yourself,
Dan!”
“Well, I don’t know,” said Dan hesitatingly. “Maybe you’re right.
But I felt that I ought to let you know how things stand, so you can
do as you like about—making up with Thompson. I guess this fellow
Hiltz hasn’t anything against you, and so it’s up to Thompson. He
can undoubtedly keep you out of the society if he wants to, Gerald.
But maybe he won’t; perhaps we’re crossing our bridge before we
come to it.”
Gerald was silent for a moment. Dan could see that he was greatly
disappointed. Finally:
“Well,” he said, “if I can’t get in, I can’t. But I was hoping—”
“Well, we’re not beaten yet,” said Dan cheerfully. “Besides, I
wouldn’t be surprised if you got an invitation from Oxford. Of course,
we Cambridge fellows pretend that our society is better than the
other, but there isn’t any particular difference, you know. Oxford has
some dandy fellows, and you and Tom get on pretty well together,
and—”
“I shan’t join Oxford,” muttered Gerald. “If I can’t get into
Cambridge I don’t want to join anything.”
“Oh, I wouldn’t say that,” said Dan soothingly. “You’d have just as
good fun in Oxford, Gerald. And you know some of the fellows there
now, and Tom can introduce you to lots more.”
But Gerald shook his head and refused to compromise, and all
Dan’s arguments failed to shake his determination to stand or fall by
Cambridge. Nothing more was said about currying favor with
Thompson. After all, Dan scarcely approved of it himself; it savored
too much of what, in school parlance, was known as “swiping.”
Perhaps it would have been just as well if Dan had not suggested
it to Gerald at all, for the latter fearing in his pride that Thompson
might think he was trying to ingratiate himself, went to quite the
opposite extreme, and, whereas hitherto he had responded to
Thompson’s careless, good-natured nods of greeting, he now
refused to notice that youth at all! The first time this occurred
Thompson thought nothing of it. The second time he scowled and
confided to the fellow he was walking with that “that Pennimore kid
was a stuck-up little chump.”
Meanwhile May came softly in and all Yardley was out of doors.
The field and track team was preparing for another victory over
Broadwood, golf enthusiasts were holding tournaments on the
slightest provocation, and the baseball teams, almost a dozen of
them in all, were disputing every foot of the field. Besides the Varsity
nine, there were four Class teams, as many dormitory teams, and
several “scrub” nines. Yardley would have seemed to a stranger to
be baseball-mad that Spring.
The Varsity had a schedule of eleven games. Of these, four had
been played by the end of the first week in May, and the Blue had
three victories and one defeat to her credit. The defeat had come at
the hands of Forest Hill School, and it had been such a drubbing for
Yardley that it quite took the fellows’ breath away. Fourteen to three
was the score. Most of the enemy’s tallies had been made during a
tragic three innings in which Reid, a substitute pitcher, had occupied
the box. Reid had subsequently steadied down, but for three innings
more Forest Hill had added an occasional run to her score, and
when, at the beginning of the sixth, Colton had stepped in to the
rescue the game was past recovery. One result of the game had
been to greatly endanger Condit’s position at third base, and now
Dan was holding down that bag quite as often as the Second Class
boy. It was not, however, until the contest with St. John’s Academy,
which took place on a Saturday toward the middle of May, that Dan
found himself starting a game at third.
St. John always brought down a strong team, and Yardley always
did her level best to win the contest, which was looked upon as
being a test of the Yardley team’s ability. A week later St. John’s
would meet Broadwood, and so it was possible to make a
comparison between Blue and Green. Colton started the game in the
box, it being planned to use him until the game was safely “on ice.”
Then Reid or Kelsey was to replace him. As it happened, though,
neither of the substitute twirlers got into the game, for St. John’s
proved to be a hard-hitting lot, and it was not until the last of the
eighth inning that the Yardley supporters breathed easy. Then a
lucky streak of batting, inaugurated by Captain Millener, and
continued by Left-fielder Loring and Shortstop Durfee, added three
runs to the Blue’s tally, and the scorebook showed the home team
leading by two runs. But it wouldn’t do to take risks even then, and
so Colton pitched the game out, managing to blank St. John’s in the
half-inning that remained.
Dan played a good game at third, accepting three chances and
making good each time. He had three assists and one put-out to his
credit when the game was over, while his batting record, if not
startling, was creditable for a first game. He made one hit, struck
out twice, and reached first once on four balls and once on fielder’s
choice. There was a good deal of luck mixed up with this showing,
but Dan didn’t worry about that. Taken altogether, he had made
good, and Payson as much as said so later in the gymnasium. And
Dan was so elated that he actually forgot to yell when the cold water
struck him in the shower!
On the following Monday the invitations came out from Cambridge
and Oxford. The lists were posted in Oxford Hall at noon. Cambridge
had issued twenty-one invitations and Oxford twenty-six. Gerald
Pennimore’s name was on the Oxford list, but not on the other. The
expected had happened.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebooknice.com

You might also like