O'Reilly logo

Pragmatic Version Control Using Git by Travis Swicegood

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting to Work with a Project

Now you have our repository in place, and you’re already tracking your first file. Next up you have to start dealing with changes.

The HTML is missing the <head> and <title> elements. Add them. Now your index.html file should look like this:

 
<html>
 
<head>
 
<title>​Hello World in Git​</title>
 
</head>
 
<body>
 
<h1>​Hello World!​</h1>
 
</body>
 
</html>

You know your file changed, and so does Git. The command git status shows you how Git sees your working tree, which is your current view of the repository. Subversion and CVS users will recognize this as their working copy.

 
prompt>​ git status
 
# On branch master
 
# Changed but not updated:
 
# (use "git add <file>..." to update what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required