CHAPTER 3

image

Creating Local Repositories with Linear History

In this chapter you will learn how to create your own repositories, and how to use them in your daily work. This includes

  • Initialization of a new repository with $ git init
  • Storing snapshots as revisions with $ git add –A and $ git commit -m "..."
  • Checking the status of the repository with $ git status -s -b

You’ll learn how to start a new project from scratch as well as how to import existing files.

Three recipes will focus on restoring the working directory to snapshots stored in revisions. After learning these recipes you should be able to reset the working directory of any repository—such ...

Get Git Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.