Beginning git and github: version control, project management and teamwork for the new developer 2 /
Beginning Git and GitHub: Version Control, Project Management and Teamwork for the New Developer 2 / converted Edition
Mariot Tsitoara
Visit to download the full and correct content document: https://textbookfull.com/product/beginning-git-and-github-version-control-project-mana gement-and-teamwork-for-the-new-developer-2-converted-edition-mariot-tsitoara/
More products digital (pdf, epub, mobi) instant download maybe you interests ...
Beginning Git and GitHub: Version Control, Project Management and Teamwork for the New Developer, 2nd Edition Tsitoara
This work is subject to copyright. All rights are solely and exclusively licensed 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.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral
with regard to jurisdictional claims in published maps and institutional affiliations.
This Apress imprint is published by the registered company APress Media, LLC, part of Springer Nature. The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
This book is dedicated to the generous individuals who have made the Git community an incredible environment to work in. Your contributions have resulted in one of the most valuable tools in the tech world. Thank you!
Introduction
This book has a clear objective: to serve as the resource I wish I had when I started my tech career. Each chapter is designed to teach you only what you need to know as a beginner. It’s not an exhaustive reference book, but it will equip you with the necessary knowledge to significantly impact your career.
By the end of this book, you will understand the essential tools for version control and project management.
Who This Book Is For
This book is aimed at absolute beginners with Git and GitHub, as well as those who have some experience but want to deepen their understanding. If you’re seeking the most effective way to quick-start your journey in the right direction, this book is for you.
How to Use This Book
Git is a straightforward tool to learn, but practical experience is crucial for grasping its concepts. The best way to learn is by applying it directly to one of your real projects. Reading the book without engaging in the exercises will prolong your learning curve.
Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub (https://github.com/Apress). For more detailed information, please visit https://www.apress.com/gp/services/source-code.
Acknowledgments
I would like to express my gratitude to my parents, Jeanne and Tsitoara, for the incredible opportunities they have provided me. Without their support and sacrifices, I wouldn’t be where I am today.
I give special thanks to my wonderful wife, Miora, and my amazing daughter, Maeva.
I am also grateful to my siblings, Alice, Elson, Thierry, Eliane, Annick, and Mamitiana, for being exceptional role models and offering unwavering support. To my lifelong friends, Christino, Johanesa, Laza, Lova, Miandry, Mihaja, and Rindra, who have taught me so much, I dedicate this book to you.
I must acknowledge my coworkers for imparting their knowledge of Git and being helpful and enjoyable to work with.
Table of Contents
Part I: Version Control with Git
Chapter 1: Version Control Systems
What Is Version Control?
Why Do I Need One?
What Are the Choices?
Local Version Control Systems
Centralized Version Control Systems
Distributed Version Control Systems
What Is Git?
What Can Git Do?
How Does Git Work?
What Is the Typical Git Workflow?
Summary
Chapter 2: Installation and Setup
Installation
Windows
macOS
Linux Setting up Git
Summary
Chapter 3: Getting Started
Repositories
Working Directory
Staging Area
Commits
Quick Start with Git
Summary
Chapter 4: Diving into Git
Ignoring Files
Checking Logs and History
Viewing Previous Versions
Reviewing the Current Changes
Summary
Chapter 5: Commits
The Three States of Git
Navigating Between Versions
Undo a Commit
Modifying a Commit
Amending a Commit
Summary
Chapter 6: Git Best Practices
Commit Messages
Git Commit Best Practices
What to Do
What Not to Do
How Git Works (Again)
Summary
Chapter 7: Remote Git
Why Work in Remote Git
How Does It Work?
The Easy Way
Summary
Part II: Project Management with GitHub
Chapter 8: GitHub Primer
GitHub Overview
GitHub and Open Source
Personal Use
GitHub for Businesses
Summary
Chapter 9: Quick Start with GitHub
Project Management
How Remote Repositories Work
Linking Repositories
Pushing to Remote Repositories
Summary
Chapter 10: Beginning Project Management: Issues
Issues Overview
Creating an Issue
Interacting with an Issue
Labels
Assignees
Linking Issues with Commits
Working on the Commit
Referencing an Issue
Closing an Issue Using Keywords
Summary
Chapter 11: Diving into Project Management: Branches
Chapter 18: Common Git Problems Repository Starting Over
Change Origin
Working Directory
git diff Is Empty
Undo Changes to a File
Commits
An Error in a Commit
Undo Commits
Branches
Detached HEAD
Working in the Wrong Branch
Catch up with the Parent Branch
Branches Have Diverged
Summary
Chapter 19: Git and GitHub Workflow
How to Use This Workflow
GitHub Workflow
Every Project Starts with a Project
Every Action Starts with an Issue
No Direct Push to main
Any Merge into the Main Branch Needs a Pull Request
Use the Wiki to Document Your Code
Git Workflow
Always Know Where You Are
Pull Remote Changes Before Any Action
Take Care of Your Commit Message
Don’t Rewrite History
Summary
Chapter 20: Making Git Yours with Aliases
What Are Git Aliases?
Using Git Aliases
Using the Git Config File
Editing the Git Config File Directly
Examples of Useful Git Aliases
Common Command Shortcuts
Listing Aliases
Summary
Index
About the Author
Mariot Tsitoara is a software engineer with a passion for the open web. He has been involved with Mozilla as a rep and a tech speaker since 2015 and has spoken extensively about open source and new technology, including Rust, WebVR, and online privacy. You can reach him at mariot@tsitoara.fr.
About the Technical Reviewer
Mihajatiana Maminiaina Rakotomalala was initially inspired by movies highlighting futuristic technology and hacking to ignite his passion for IT.
His journey began as an IT support engineer, demonstrating a keen understanding of network monitoring and management and server maintenance.
Venturing into web application development, he contributed significantly to creating dynamic websites using JavaScript frameworks like ReactJS.
Simultaneously, he broadened my technical knowledge by installing and troubleshooting different operating systems and applications providing essential problem resolution services to users.
Currently serving as an IT engineer in the government sector, he oversees setting up and improving the IT infrastructure.
This chapter introduces you to version control systems. By the end of this chapter, you will understand Git version control and its historical background. The primary goal is to recognize the scenarios that necessitate version control and to comprehend why Git is a reliable and secure choice.
What Is Version Control?
As the name implies, version control involves managing multiple versions of a project. It tracks every change made to project files (additions, edits, or deletions). Each change is recorded, allowing for easy undoing or rolling back.
To effectively implement version control, you need to utilize version control systems. These systems facilitate navigation through changes and provide a swift way to revert to previous versions when needed.
Teamwork is a significant advantage of version control. When multiple individuals contribute to a project, tracking changes can become chaotic, increasing the risk of overwriting each other’s work. With version control, team members can work on separate copies of the project (referred to as branches) and merge their changes into the
main project only when they, or other team members, are satisfied with the work.
Note This book was written from a developer’s perspective; however, the concepts and principles discussed apply to any type of text file, not just code. Version control systems can track changes not only in text files but also in various non-text files such as images or Gimp files.
Why Do I Need One?
Have you ever worked on a text project or code that required you to recall the specific changes made to each file? If yes, how did you manage and control each version? Perhaps you attempted to duplicate and rename files using suffixes like Reviewed, Fixed, or Final? Figure 1-1 illustrates that kind of version control.
The figure illustrates the approach that many people adopt to handle file changes. However, this method can quickly become unmanageable. It is easy to lose track of file identities and the specific changes made between them. To effectively track versions, one suggestion is to compress the files and append timestamps to their names. This arrangement organizes the versions based on their
Figure 1-1 Compressed files with suffixes to track versions
creation dates. Figure 1-2 demonstrates this type of version tracking.
The solution depicted in Figure 1-2 may seem ideal, but it becomes evident that there is no way to determine the contents or descriptions of each version.
To address this issue, some developers employ a solution similar to the one shown in Figure 1-3. They include a separate file containing a summary of the changes made. This helps provide clarity and context to each version.
Figure 1-3 A separate file to track changes in the project
Figure 1-2 Compressed files with prefixes sorted by date
Figure 1-3 portrays the inclusion of a separate file within the project folder containing concise descriptions of the changes made. Additionally, note the presence of compressed files that store previous versions of the project.
However, this system falls short in comparing each version and tracking file changes. Memorization becomes necessary, especially as the project grows and the folder expands with each version.
Consider the challenges that arise when new team members join your project. Would you resort to emailing files or versions back and forth? Or would you opt to work on the same remote folder? In the latter case, how would you determine who is working on which file and what changes have been made?
Furthermore, have you ever desired to undo a change made years ago without disrupting the entire project? The need for an unlimited and powerful Ctrl+Z arises.
All these issues can be resolved using a version control system (VCS). A VCS tracks every change made to each file in your project and provides a straightforward method for comparing and reverting those changes. Each project version is accompanied by a description of the modifications and a list of new or edited files. When additional individuals join the project, a VCS can precisely identify the author of a specific file edit at a given time. This saves you valuable time, as you can focus on writing instead of meticulously tracking each change. Figure 1-4 depicts a versioned project managed by Git, showcasing the combination of all the solutions discussed in this chapter: change descriptions, teamwork, and edit dates.
Let’s find out more about version control systems.
Figure 1-4 A project versioned by Git
What Are the Choices?
There are many flavors of version control systems, each with its own advantages and shortcomings. A VCS can be local, centralized, or distributed.
Local Version Control Systems
These were the first VCSs created to manage source code. They worked by tracking the changes made to files in a single database that was stored locally. This meant that all the changes were kept on a single computer, and if there were any problems, all the work would be lost. It also meant that working with a team was out of the question.
One of the most popular local VCSs was a source code control system (SCCS), which was free but closed source. Developed by AT&T, it was widely used in the 1970s until the introduction of a revision control system (RCS). RCS became more popular than SCCS because it was open source, cross-platform, and much more effective. Released in 1982, RCS is currently maintained by the GNU Project. One of the drawbacks of these two local VCSs was that they only worked on one file at a time; there was no way to track an entire project with them.
To help you visualize how it works, Figure 1-5 illustrates a simple local VCS.
Figure 1-5 How a local VCS works
As you can see in Figure 1-5, everything is on the user’s computer, and only one file is tracked. The versioning is stored in a database managed by the local VCS.
Centralized Version Control Systems
Centralized VCS (CVCS) stores the change history on a single server to which the clients (authors) can connect. This offers a way to work with a team and allows monitoring a project’s pace. They are still popular because the concept is simple and easy to set up.
The main problem with CVCS, like local VCS, is that a server error can result in losing all of the team’s work. A network connection is also required since the main project is stored on a remote server.
Figure 1-6 shows how it works.
Figure 1-6 How a centralized VCS works
Figure 1-6 shows that a centralized VCS works similarly to a local VCS, but the database is stored on a remote server.
The main problem teams face using a centralized VCS is that once someone uses a file, it is locked, and other team members cannot work on it. As a result, they have to coordinate among themselves to modify a single file. This creates significant delays in development and leads to frustration for contributors. Moreover, the more members there are on the team, the more problems arise.
To address the issues of local VCS, the concurrent version system (CVS) was developed. It was open source and could track multiple sets of files instead of just one. Many users could also work on the same file simultaneously, hence the word concurrent in the name. All the history was stored in a remote repository, and users would keep up with the changes by checking out the
server, which involved copying the contents of the remote database to their local computers.
Apache Subversion (SVN) was developed in 2000 and offered everything that CVS could, with an additional benefit: it could track non-text files. One of the main advantages of SVN was that, instead of tracking a group of files like the previous VCS, it tracked the entire project. Thus, it essentially tracked the directory instead of individual files. This meant that renaming, adding, and removing files were also tracked. These features, combined with its open source nature, made SVN a very popular VCS, which is still widely used today.
Distributed Version Control Systems
Distributed VCS works similarly to centralized VCS but with a significant difference: no main server holds all the history. Instead, each client has a copy of the repository (including the change history) rather than checking out a single server.
This greatly reduces the risk of losing everything since each client has a clone of the project. With a distributed VCS, the concept of a “main server” becomes blurred because each client has all the power within their own repository. This greatly encourages forking within the open source community. Forking refers to cloning a repository to make your own changes and have a different perspective on the project. The main benefit of forking is that you can pull changes from other repositories if you see fit, and others can do the same with your changes.
A distributed version control system is generally faster than other types of VCS because it doesn’t require network access to a remote server. Nearly everything is done locally. There is also a slight difference in how it works: instead of tracking the changes between versions, it tracks
Another random document with no related content on Scribd:
AS TOLD BY HER
THE waiters had served the coffee and were retiring in long rows down the sides of the big dining-hall. The rattle of knives and forks and the noise of general and animated talk were subsiding, and the pleased, expectant hush which always precedes the toasts, was falling upon the assembly. At the lower end of the room, farthest from the “distinguishedguest” table, the unimportant people began to turn their chairs around toward the speakers and to say “ ’Sh!” and “Who’s that?” to each other in subdued whispers, and the seniors grasped their sheepskins less nervously and began to realize their importance and the fact that they were no longer undergraduates but full-fledged alumnæ. And with the realization came a curious disagreeable sensation and a queer tightening in the throat, accompanied by a horrible inclination to shed tears over the closed chapter of their lives. Then they fiercely thought how their brothers act under similar circumstances, and wished they were men and could give the class yell and drink champagne to stifle their feelings. That being impossible they tasted a very mild decoction of coffee and turned their troubled eyes to the far end of the room, and wished ardently that the President would get on her feet and say something funny to make them forget that this was the end, the last act of politeness on the part of the faculty to them, that they were being gracefully evicted, as it were, and could never be taken back upon the same terms or under the same conditions.
It was the annual Commencement dinner to the retiring senior class, and the senior class was, as usual, feeling collapsed and blank after the excitement of Commencement week and the discovery that they were B.A.’s or B.S.’s, and that the world was before them and there would be no more faculties to set them going or haul them up, but that they would have to depend on their own faculties in the future. There was the annual foregathering of brilliant men and women whose presence was to be an incentive to the newly fledged alumnæ, and the display of whose wit and wisdom in after-dinner speeches was to be a last forcible impression of intellectual vigor and acquirements left on their minds.
Suddenly the President arose. She stood there, graceful, perfectly at ease, waiting for a moment of entire silence. Her sensitive, bloodless face looked more animated than usual, her brown eyes quietly humorous. It was a face
eminently characteristic—indicative of the element of popularity and adaptability in her nature that made her, just then, so valuable to the college. When she spoke her voice carried a surprising distance, notwithstanding its veiled, soft quality, so that those farthest from her were able to catch and enjoy the witty, gnomic, sarcastic manner of her speech.
What she said was taken down by the shorthand reporter smuggled in for the occasion by the enterprising class-president and is enrolled in the classbook, so it need not be recorded here; but when she had finished, the editor of one of the foremost magazines in the country was smiling and nodding his head appreciatively, and a man whose sermons are listened to by thousands every Lord’s Day leaned over and made some quick side remark to her and ran his hands in a pleased, interested way through his long hair; and the young and already famous President of a certain college said, on rising, that he felt very genuine trepidation at attempting any remarks after that. He fully sustained his reputation, however, of a brilliant talker, and was followed by the honorary member of the juniors, whose post-prandial speeches have made him famous on both sides of the water.
The room became absolutely quiet, save for the voice of the speaker, the occasional burst of applause, and the appreciative murmur of the listeners. Outside, the afternoon began to grow mellow, long shadows thrown by the pointed turrets of the building lay across the green campus, the ivy at the big windows waved to and fro slightly in the cool breeze. Attention flagged; people began to tire of the clever, witty responses to the toasts and to look about them a little.
At one of the tables reserved for the alumnæ, near the upper end of the room, sat a girl dressed in deep mourning. Her face was very beautiful and intelligent, with the intelligence that is more the result of experience than of unusual mental ability. There were delicate, fine lines about the mouth and eyes. She could not have been more than twenty-four or five, but there was an air of firmness and decision about her which contradicted her blond— almost frivolous—beauty and lent dignity to the delicate figure.
After awhile she leaned back in her chair a trifle wearily and looked about her curiously as if for changes. The general aspect of the place remained the same, she decided, but there were a great many new faces— new faces in the faculty, too, where one least likes to find them. Here and there she saw an old acquaintance and smiled perfunctorily, but, on the whole, there was no one present she cared very much to see. She had just
come to the conclusion that she was sorry she had made the long journey to be present at the dinner when she became conscious that someone was looking intently at her across the room. She leaned forward eagerly and smiled naturally and cordially for the first time. And then she sank back suddenly and blushed like a school-girl and smiled again, but in a different way, as if at herself, or at some thought that tickled her fancy. It certainly did strike her as rather amusing and presuming for her to be smiling and bowing so cordially to Professor Arbuthnot. She remembered very distinctly, in what awe she had stood of that learned lady, and that in her undergraduate days she had systematically avoided her, since she could not avoid her examinations and their occasionally disastrous consequences. She recalled very forcibly the masterly lectures, the logical, profound, often original talks, which she had heard in her lecture-room, though she had to acknowledge to herself reproachfully, that the matter of them had entirely escaped her memory. She had been one of a big majority who had always considered Professor Arbuthnot as a very high type—perhaps the highest type the college afforded—of a woman whose brains and attainments would make her remarkable in any assembly of savants. In her presence she had always realized very keenly her own superficiality, and she felt very much flattered that such a woman should have remembered her and not a little abashed as she thought of the entire renunciation of study she had made since leaving college. She wondered what Professor Arbuthnot might be thinking about her—she knew she was thinking about her, because the bright eyes opposite were still fixed upon her with their piercing, not unkindly gaze. It occurred to her at last, humorously, that perhaps the Professor was not considering her at all, but some question in—thermo-electric currents for instance.
But Miss Arbuthnot’s mind was not on thermo-electric currents; she was saying to herself: “She is much more beautiful than when she was here, and there is a new element of beauty in her face, too. I wonder where she has been since, and why she is in mourning. She was unintelligent, I remember. It’s a great pity—brains and that sort of beauty rarely ever go together. Her name was Ellis—yes—Grace Ellis. I think I must see her later.” And the Professor gave her another piercing smile and settled herself to listen to a distinguished political economist—a great friend of hers—speak.
The Political Economist got upon his feet slowly and with a certain diffidence. He was a man who had made his way, self-taught, from poverty
and ignorance to a professorship in one of the finest technical schools of America.
There was a brusqueness in his manner, and the hard experiences of his life had made him old. He spoke in a quiet, authoritative way. He declared, with a rather heavy attempt at jocoseness, that his hearers had had their sweets first, so to speak, and that they must now go back and take a little solid, unpalpable nourishment; that he had never made a witty or amusing remark in his life, and he did not propose to begin and try then, and finally he hinted that the President had made a very bad selection when she invited him to respond to the toast—“The Modern Education of Woman.” As he warmed to his subject he became more gracious and easy in manner. He spoke at length of the evolution of women’s colleges, their methods, their advantages, their limitations; he touched upon the salient points of difference between a man’s college life and that of a girl; differences of character, of interests, of methods of work. And then he went on:
“I believe in it—I believe firmly in the modern education of woman. It is one of the things of most vital interest to me; but my enthusiasm does not blind me. There are phases of it which I do not indorse. I object to many of its results. The most obvious bad result is the exaggerated importance which the very phrase has assumed.” He smiled plaintively around upon the company. “Are we to have nothing but woman’s education—toujours l’éducation de la femme? There is such eagerness to get to college, such blind belief in what is to be learned there, such a demand for a college education for women, that we are overwhelmed by it. Every year these doors are closed upon hundreds of disappointed women, who turn elsewhere, or relinquish the much-prized college education. The day is not far distant when it will be a distinct reproach to a woman that she is not college-bred.” He looked down thoughtfully and intently and spoke more slowly.
“It is this phase of it which sometimes troubles me. Life is so rich in experience for woman—so much richer and fuller for woman than for
THE POLITICAL ECONOMIST
man—that I tremble at this violent reaction from nature to art. To-day woman seems to forget that she must learn to live, not live to learn. At the risk of being branded as ‘behind the times,’ of being considered narrow, bigoted, old-fashioned, I must say that until woman re-discovers that life is everything, that all she can learn here in a hundred times the four years of her college course is but the least part of what life and nature can teach her, until then I shall not be wholly satisfied with the modern education of woman.”
When he ceased there was an awkward and significant silence, and the editor looked over at him and smiled and shook his head reprovingly. And then the President got up quickly and with a few graceful, apropos remarks restored good-humor, and taking the arm of the distinguished divine, led the way from the dining-hall to the reception-rooms, and people jostled each other good-naturedly, and edged themselves between chairs and tables to speak to acquaintances, and there was much laughter and questioning and exclamations of surprise and delight, until finally the long procession got itself outside the dining-hall into the big corridors.
At the door Professor Arbuthnot caught sight of Miss Ellis again. She beckoned to the girl, who came quickly toward her.
“I am tired and am going to my rooms for awhile, will you come?” The girl blushed again with pleasure and some embarrassment.
“I should be delighted,” she said simply, and together they walked down the broad hallway.
“It’s very good of you,” she broke in nervously, looking down at the small, quiet figure beside hers—she was head and shoulders taller than the Professor.
“Not at all,” declared Miss Arbuthnot, kindly. “I want to see you—it has been a long while since you were a student here—four or five years I should say—and you recall other faces and times.”
“It has been four years—I can hardly believe it,” said the girl, softly. She wondered vaguely what on earth Miss Arbuthnot could wish to see her for— she had been anything but a favorite with the faculty as a student, but she felt very much flattered and very nervous at the attention bestowed upon her.
When she reached Professor Arbuthnot’s rooms, the embarrassment she had felt at being noticed by so distinguished a member of the faculty visibly increased.
“IT HAS BEEN A LONG WHILE SINCE YOU WERE A STUDENT HERE”
The place was typical—the absence of all ornament and feminine bric-àbrac—the long rows of book-shelves filled with the most advanced works on natural sciences, the tables piled up with brochures and scientific magazines, enveloped her in an atmosphere of profound learning quite oppressive. She had never been in the room but once before, and that was on a most inauspicious occasion—just after the mid-year’s. She wondered uneasily, and yet with some amusement, if Professor Arbuthnot remembered the circumstance. But that lady was not thinking of the young girl. She was busy with her mail, which had just been brought in, opening and folding up letter after letter in a quick, methodical way.
“More work for me,” she said, smiling; “here is an invitation to deliver six lectures on electro-optics.” The girl looked at her admiringly.
“Absolutely I’ve forgotten the very meaning of the words; and as for lecturing!” she broke off with a little laugh. “Are you going to give them?”
“Yes: it makes a great deal of work for me, but I never refuse such invitations. Besides I shall be able to take these lectures almost bodily from a little book I am getting out.” Professor Arbuthnot went over to the desk and lifted up a pile of manuscript, and smiled indulgently at the girl’s exclamation of awe.
“It isn’t much,” she went on. “Only some experiments I have been making in the optical effects of powerful magnets. They turned out very prettily. I have a good deal of hard work to do on the book yet. I shall stay here a week or two longer, quite alone, and finish it all up.”
The girl touched the papers reverently.
“Here is a note I have just received from Professor ” (Miss Arbuthnot named one of the most distinguished authorities of the day on magnetism and electricity). “I sent him some of the first proof-sheets, and he says he’s delighted with them. We are great friends.”
The girl’s awe and admiration increased with every movement. She looked at the small, slight woman whose intelligent, ugly face had an almost child-like simplicity of expression, contrasting strangely enough with the wrinkled, bloodless skin and piercing eyes. Her hair, which was parted and brushed severely back, was thickly sprinkled with gray.
She gasped a little. “You actually know him—know Professor ——?”
Miss Arbuthnot laughed. “Oh, yes,” she said; “we often work together. We get along famously; we are ‘sympathetic’ in our work, as the French say.”
The girl swept her a mock courtesy.
“I feel too flattered for anything that you deign to speak to me,” she said, laughing and bowing low.
Professor Arbuthnot looked pleased; she was far above conceit, but she was not entirely impervious to such fresh, genuine admiration. She was feeling particularly happy, too, over the results of her experiments— particularly interested in her work.
“If you are so impressed by that,” she laughed, “I shall have to tell you something even more wonderful still. I have just received an honorary degree from —— College. It was quite unexpected, and I must say I am extremely pleased. It is very agreeable to know that one’s work is appreciated when one has given one’s life to it.”
It seemed to the girl, with these evidences of success appealing to her, that a life could not be more nobly spent than in such work. She went slowly around the room after that, looking at a great many interesting things. At books with priceless autographs on their title-pages, and photographs of famous scientists, and diagrams of electrical apparatus, and editions in pamphlet form of articles by Professor Arbuthnot, published originally in scientific journals.
The girl suddenly felt sick and ashamed of herself. It struck her very forcibly just how little she knew, and how she had neglected her opportunities.
“What an awful ignoramus I am!” she burst out at length. “I don’t know what these mean; I have only the vaguest idea what these men have done. How different you are! Your life has had a high aim and you have attained it. While I——!” she stopped with a scornful gesture. “If it were not for Julian I believe I would come back here and start over!”
Miss Arbuthnot looked at her critically. She admired the girl’s beauty tremendously—it was her one weakness—this love of beauty. She never looked at herself in a mirror oftener than necessary.
“Ah! Julian; who is Julian?”
The girl blushed again—she had a pretty way of flushing quickly.
“Julian?—why he’s my husband. I forgot to tell you that I married my cousin, Julian Ellis, as soon as I left college.”
“Really!” Miss Arbuthnot came over and sat down on the divan beside the girl. “You look so young,” she said, rather wistfully. “And you have been married four years?”
The girl nodded. “It seems much longer,” she said. “I have had—a great deal of trouble.”
“Tell me about it,” said the older woman kindly. But the girl was much embarrassed at the idea of talking of her own little affairs to Professor Arbuthnot.
“I am afraid it would only bore you,” she said, hurriedly. “Your interests —you are interested in so many——”
But Miss Arbuthnot was firm. “Let me hear,” she insisted.
“I’m sure I hardly know what there is to tell,” the girl began nervously. “My father was much opposed to my marrying Julian. He did not wish me to leave college; and he did not believe in cousins marrying. He said that if we did he would disinherit me—you know he is rich. But Julian and I were in love with each other, and so of course we got married.” She stopped suddenly and drawing off her glove looked at her wedding-ring. Professor Arbuthnot watched her curiously. The girl’s simple statement—“and of course we got married” struck her forcibly. She wondered what it would feel like to be swayed by an emotion so powerful that a father’s commands and the loss of a fortune would have absolutely no influence upon it. She could not remember ever having felt anything like that.
“Julian was awfully poor and I of course had nothing more, and so we went to Texas—Julian had an opening there,” she went on. “It was awfully lonely—we lived ten miles from the nearest town—and you know what a Texas town is.” Miss Arbuthnot shook her head. She had never been west of Ohio.
The girl gave a little in-drawn gasp. “Well, it’s worse than anything you can conceive of. I think one has to live in one of them and then move away and have ten miles of dead level prairie land between you and it to know just what loneliness is. But we were so happy, so happy at first—until Julian was taken ill.” She leaned back against the couch and clasped her hands around her knees.
“It was awful—I can’t tell you,” she went on in a broken voice. “But you know what unspeakable agony it is to see what you love best on earth ill and suffering, and you nearly powerless to do a thing. And how I loved him! I never knew until then what he was—how much of my life he had become. You must know what agony I went through?” she looked interrogatively, beseechingly at the woman beside her.
Miss Arbuthnot looked away. “I am not sure—I—I was never in love,” she said uncertainly. A curious wave of jealousy swept over her that she who had been such a student, whose whole life had been a study, should have somehow missed experiences that this girl had lived through already. The girl shook her head softly, pityingly, as if she could hardly believe her.
“I shall never forget it, and that night,” she went on, closing her eyes faintly. “I thought he was dying. I had to have a doctor, but I was afraid to leave him. I remember how everything flashed through my mind. It was a decision for life or death. If I left him I knew I might never see him alive again, and yet if I did not——” She opened her eyes wide and clasped and unclasped her hands. “It was the most horrible moment of my life.”
“My poor child!” Miss Arbuthnot put her hand timidly on the girl’s arm. She suddenly felt absurdly inexperienced in her presence.
“I got Ivan’s saddle on him—I don’t know just how—and we started. It was about two o’clock I remember. The prairie looked just like the sea, at night—only more lonesome and quite silent. I was horribly frightened. Even Ivan was frightened. He trembled all over—it’s a terrible thing to see a horse tremble with fright.”
“Do you mean to say,” demanded Professor Arbuthnot, “that you rode twenty miles in the dead of night, alone upon a Texas prairie?”
“Yes,” answered the girl mechanically. “It was for Julian,” she added as if in entire explanation.
Miss Arbuthnot looked at her; she could not realize such wealth of courage and devotion. She wondered with a sudden, hot shame whether she would have dared it had she been in this girl’s place.
“I don’t think I ever prayed before—really prayed you know,” she ran on meditatively as if she had forgotten the Professor’s presence. “It was dawn when we got back.” She stopped entirely and looked out through the window onto the cool green campus. Miss Arbuthnot scarcely dared move. There was something so intimate, almost sacred in the girl’s revelations.
“Did he live?” she inquired softly at length.
The girl turned her face toward her. An almost illuminated look had come into it.
“Yes—the doctor saved his life, but he said if I had been two hours later ——!”
“You saved his life!” Professor Arbuthnot got up and walked to the window. She could not quite take it all in. The girl appeared entirely different to her. She was looking at a woman who had saved the life of the man she loved.
“And then—” the girl gave a little laugh—“I fainted—wasn’t it ridiculous? I am such an idiot. It makes me ashamed to think of it now— when there was so much to be done—and for me to faint!” She gave an impatient little shake of the head.
“I am sure you never did anything so silly as to faint!” She glanced admiringly at Professor Arbuthnot.
“I don’t think I ever experienced any emotion sufficiently strong to make me.” Miss Arbuthnot spoke so grimly that the girl jumped up hurriedly.
“I’m awfully afraid I am boring you and keeping you from your work ——” She gave a glance at the manuscript upon the desk. “I’m sure you are wanting to get at it, and think me very troublesome to tell you all this about myself.”
Professor Arbuthnot looked at her a moment.
“Sit down!” she said imperiously. “I am learning more than if I were working on the physical principles of the nebular theory!”
The girl gave a gay, puzzled little laugh.
“Are you making fun of me? I’m sure I don’t know what you mean.”
Miss Arbuthnot waved her remark away impatiently.
“And after you had recovered from your fainting spell, what happened?”
“Oh—I helped the doctor and we pulled Julian through together somehow. And then I went to work. He was ill all winter—something had to be done—I sing fairly well——”
“I remember now,” broke in Miss Arbuthnot. “You used to sing at College Vespers. I liked your voice.”
The girl gave a gasp of pleasure. She felt immensely flattered that Professor Arbuthnot had liked to hear her sing.
“Thank you,” she said feelingly. “I got a position in a church choir and I went into town three days in the week and gave lessons. I made four hundred dollars that winter.” She broke off with a little laugh. “I don’t think I ever felt so good in all my life as when I counted up and found that I had really made four hundred dollars for Julian! I never understood before why poor people want to get married—it’s for the fun of working for each other I think. It’s the most satisfying sensation I know of.” She glanced up at the woman beside the window. Miss Arbuthnot nodded absently. She was thinking of her safe investments—she had accumulated a good deal of money during her long years of teaching and her people had all been well off and she had never given a cent to anyone except in presents and trifling remembrances and organized charitable work. A strange desire grew upon her to share her life with someone. She looked with troubled eyes at the girl who had suddenly made her work and her life dissatisfying to her.
“I don’t understand”—she murmured—“and didn’t you ever regret— regret your wealth and social position?—the other life you had known?”
“I think it’s my turn not to understand,” said the girl slowly with a puzzled look. “You mean did I regret marrying Julian?”
Miss Arbuthnot nodded. An angry little flush mounted to the girl’s cheek, and then, as if the mere thought was too amusing to be taken seriously:
“Regret marrying Julian? O! Professor Arbuthnot—and then there was little Julian, you know. He was the dearest, the sweetest—wait, I have his picture.” She pulled at a little silk cord about her neck and drew forth a small miniature case. In it, painted on porcelain, was the head of a child with the blond beauty of its mother. As the girl looked at it her eyes filled with tears and she bent over it sobbing and kissing it passionately.
“That is all I have to regret,” she said. “He was two years old when he died—that was almost a year ago. I couldn’t tell you what he was like. I think he was the brightest, prettiest, sweetest boy in the world. You ought to have seen his hands and feet—all dimples and soft pinkiness and milky whiteness—and his eyes and long lashes——!” she stopped breathlessly.
Professor Arbuthnot looked at her wonderingly. She went over to her and looked down at the crushed figure.
“You have loved and loved again and lost. You have been a mother and your child is dead,” she said slowly. “I would sympathize with you if I knew how.”
The girl caught her hand.
“How kind you are! I never speak of this—I hardly know how I came to do so with you. I am sure I must have wearied you.” She put the locket back and began to draw on her gloves again slowly.
Professor Arbuthnot said nothing. In the last hour she had had glimpses of a life and a love
“HOW KIND YOU ARE”
she had never known, and the revelation silenced her. She had sometimes reproached herself that the studious calm, the entire absorption of her life in her work had been exaggerated, and as she looked at the slight figure in its black gown, at the pale face with its sombred, youthful beauty, the conviction was borne in upon her, by this little breath from the outside world, by the life of this girl as told by her, that the insularity of her existence had been a mistake. A sudden intense dissatisfaction and impatience with her life took hold upon her.
The girl rose to go. She stood there hesitating, embarrassed, as if she wished to ask something, and rather dreaded doing so.
“I—I shall have a great deal of time this winter,” she hazarded, twisting the ring of her fan slowly round and round her finger, “and I am going to study—indeed I am!” She glanced up quickly, as if afraid Professor Arbuthnot might be smiling. “I know you think it foolish for me to try, but you don’t know how you’ve inspired me this afternoon!” She went on enthusiastically. “You and everything here make me realize intensely how little I know, and I am going to begin and really learn something. You don’t know how much obliged I’d be if you would tell me a little how to begin— what to start on—something easy, adapted for weak intellects!”
She looked up smiling and with heightened color at Professor Arbuthnot. She still stood in so much awe of her and was so afraid of being laughed at!
But that lady was not laughing at all. She looked preternaturally grave.
“It seems to me,” she said slowly, “that you and the natural sciences can get along admirably without each other. Why, child, you have lived!” she cried with sudden vehemence. She went over and shook her gently by the shoulder. “You are twenty-four and I am fifty! In four years you have crowded into your life more than I shall ever learn!”
The girl looked at her wonderingly, puzzled.
“Have you forgotten so soon what we heard this afternoon—that ‘life is everything, that all that you can learn in a hundred times the four years of your college course is but the least part of what life and nature can teach you?’ ” She pushed the girl toward the door.
“When you are tired of living come back to me.”
She stood and watched the girl, with the mystified, half-hurt look on her face, disappear down the corridor. When she had quite gone she went in and stood at the window for a long, long while looking out at the deepening
shadows, and then she seated herself grimly at her desk and wrote to her publishers that they would have to delay the appearance of her book, as she felt she needed a vacation and would have to give up work on it for awhile.
A SHORT CAREER
SHE was so noticeably pretty and stylish, with that thorough-bred air of the young girl to whom life has always been something more or less of a social event, that she attracted a great deal of attention, though, of course, she very properly appeared to be oblivious of that fact. Even the baggagemaster, when she caught his eye, hastened toward her and bestirred himself generally in a way that is not characteristic of baggage-men on the Boston and Albany, or any other road. She noticed vaguely that he seemed rather surprised when she gave him her four trunk-checks and he assured her with elaborate politeness that the train would stop at a certain small station without fail, to let off several hundred young women who wished to go directly to “the College.”
When Miss Eva Hungerford, on the completion of an enthusiastic college career, wrote to her young Philadelphia cousin, Margaret Wright, that she ought to take a college course, it was quite in despair of really inducing that young lady to do so, and only in the vain hope of saving her from an early and ill-considered marriage with an extremely nice Harvard youth, who declared that he would cheerfully forego his senior year if her parents would give their consent.
It was therefore with both delight and surprise that, just before starting for Europe, Miss Hungerford received a rather gloomy letter from her young cousin, who said that with such a brilliant example before her, and deeply impressed by the weighty arguments in her cousin’s letter, she had told the Harvard man that she was much too young and ignorant to marry, and fully convinced that society was a hollow sham, she had determined to devote the next four years to those pursuits which had raised her cousin so far above the ordinary girl. She was even greatly interested, she said, in her preparations for the entrance examinations which she would take at Philadelphia, and the chances of her being admitted. Miss Hungerford was quite touched by the little tribute to herself contained in the letter, and wrote a most cordial answer, and rather upbraided herself for having thought so lightly of her cousin. But her mother seemed to be distressingly sceptical about Margaret’s heroic determination, and said she shouldn’t wonder if some misunderstanding with the Harvard man were not at the bottom of it. But Miss Hungerford was confident that such a lofty purpose could have been
born only of some noble sentiment, and refused to have her faith in her young cousin shaken by such a supposition.
When Miss Wright got off the train at the pretty little station, she found herself in the midst of a sufficiently large crowd of young women, all of whom seemed to be aggravatingly well acquainted with each other, and who set about in a most business-like way to get where they wanted to go, some taking “barges” and omnibuses, others striking out easily over the roads in the direction of the college. Being totally unfamiliar with the place and somewhat bewildered by the number of girls, Miss Wright thought she would simply take a carriage and get up to the college as quickly as possible.
She never told anyone but her best friend what were her sensations on reaching the big building and being “numbered” for an interview with one of the assistant professors, instead of seeing the president herself, as she had expected to do; or how hurt she felt at being totally ignored by the vast majority of busy, rather severe-looking young women, or how grateful she felt to a patronizing Sophomore who talked to her kindly, if condescendingly, for a few moments and who took her through unending corridors to her rooms. Later in the day she found two or three girls who wore tailor-made travelling gowns and seemed ill at ease, and they all huddled together in a corner of one of the big corridors and talked rather helplessly to each other. They would have liked to know what the peals on the big Japanese bell meant, and if they were expected to do anything about it, but they were afraid to ask anyone, because they were not sure which were the professors and which the students.
When it came her turn to see the assistant, she felt quite ready to go home. She had made out a list of studies which she thought she would like, but when she showed it to the professor, that astute lady very kindly but firmly told her that it was ill-advised and made her out another. She had wanted to study mathematical astronomy, because a Harvard man had said a chum of his studied it and found it “immense,” and besides she thought the name would impress her friends; but the professor pointed out to her that she would have to take the entire course in mathematics before she could hope to do anything with the astronomy. It was the same way with several other things, and she found, when the interview was over, that her list consisted mostly of freshman studies. She was rather disheartened by this, but remembered that Miss Hungerford had been a full freshman, and so she determined to go to work conscientiously.
And she did work very hard, but there were a great many young women who seemed to have had a much more thorough previous education than herself, and though she was not in the least snobbish, she was secretly surprised and a little bit aggrieved by their evident disregard of her superior gowns. She might as well not even curl her hair, she thought gloomily— most of the best students wore theirs back in a rather uncompromising way, and she thought it might have some influence for the better on her mind, and half-way determined to do it. But when she saw how she looked with it straight and pulled quite back, she gave it up for fear the Harvard man (who though so near, maintained a stony silence and invisibility) should happen to come over to the college to see some other girl.
When the winter concerts began and the young women were inviting their friends out from the “Tech” and Harvard and Amherst, and other places which to any but the college mind would seem appallingly distant, she sat resigned and alone, and wondered what her people would think if they could see her looking so sad and deserted. Her friends, she knew, would feel sorry for her, and would at last believe in her determination to go through the course.
When she had been at college about four months and was beginning to realize how little she knew, and how infinitely far off the president still seemed, and the effect of the study of chemistry on a brain unprepared for it, and was pitying herself for looking so pale and thin under her anxieties—one of the favorite concerts of the year was given. A celebrated violinist and his wife, a charming singer, were coming out. It was the last concert before the Christmas holidays, and one of the tailor-made girls with whom she had become intimate since that miserable first day had invited a lot of men out and had asked her to help entertain them. As every one knows, it is a longestablished custom in that college for those young women who are so fortunate as to have a large masculine acquaintance to ask their friends to help them “take care” of the surplus male element.
Miss Wright was feeling very blue that evening and had just about made up her mind to stay at the college through the Christmas vacation, that she might spare her parents the distress of seeing her so worn and changed; so that when the tailor-made girl came to ask her to see after some of her friends for her, she thought that probably she was entitled to some recreation for the good resolution she had made. But she was now much too indifferent