Reader small image

You're reading from  Git Essentials

Product typeBook
Published inApr 2015
Reading LevelBeginner
Publisher
ISBN-139781785287909
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Ferdinando Santacroce
Ferdinando Santacroce
author image
Ferdinando Santacroce

Ferdinando Santacroce is a developer, author, and trainer who loves learning new things. As a software developer, Ferdinando has mainly worked on the .NET platform using C#, bridging the gap between old-style systems and new technologies. Over the span of his career, he has allowed some COBOL applications to talk to remote services, databases, and electronic devices such as cash handlers, scanners, and electronic shelf labels. At the moment, he is committed to helping the largest energy player in Italy to face new challenges in the market by developing Java and JavaScript-based applications. Other than this, he's focusing on continuous improvement and agile movement, which he follows with great care, in conjunction with XP foundations and lean manufacturing. He's one of the organizers of Italian Agile Days, the most famous and appreciated conference in the Italian Agile panorama. Ferdinando loves to share ideas with other professionals and to speak at public conferences; every time he has, he has learned something new. He enjoys writing as well. After a hiatus of a few years, he has started blogging again about his work and passions, which, according to him, are more or less the same thing. Most of what he has learned over the years has been with the help of his friends and colleagues. Other than working within the same team or on the same code base, they have encouraged him to read books and attend inspiring conferences, such as XP Days, Italian Agile Days, and others that have helped his growth.
Read more about Ferdinando Santacroce

Right arrow

Git references


We said that a Git repository can be imagined as an acyclic graph, where every node, the commit, has a parent and a unique SHA-1 identifier. But during the previous chapters, we even used some references such as the HEAD, branches, tags, and so on.

Git manages these references as files in the .git/refs repository folder:

If you open one of those files, you will find it inside the SHA-1 of the commit they are tied to. As you can see, there are subfolders for tags and branches (called heads).

Symbolic references

The HEAD file instead is located in the .git folder, as shown in the following screenshot:

HEAD is a symbolic reference; symbolic references are references that point to other references, using the ref: <reference> syntax. In this case, the HEAD is currently pointing to the master branch; if you check out another branch, you will see the file's content change, as shown in the following screenshot:

Ancestry references

In Git you often need to reference the past (for example...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Git Essentials
Published in: Apr 2015Publisher: ISBN-13: 9781785287909

Author (1)

author image
Ferdinando Santacroce

Ferdinando Santacroce is a developer, author, and trainer who loves learning new things. As a software developer, Ferdinando has mainly worked on the .NET platform using C#, bridging the gap between old-style systems and new technologies. Over the span of his career, he has allowed some COBOL applications to talk to remote services, databases, and electronic devices such as cash handlers, scanners, and electronic shelf labels. At the moment, he is committed to helping the largest energy player in Italy to face new challenges in the market by developing Java and JavaScript-based applications. Other than this, he's focusing on continuous improvement and agile movement, which he follows with great care, in conjunction with XP foundations and lean manufacturing. He's one of the organizers of Italian Agile Days, the most famous and appreciated conference in the Italian Agile panorama. Ferdinando loves to share ideas with other professionals and to speak at public conferences; every time he has, he has learned something new. He enjoys writing as well. After a hiatus of a few years, he has started blogging again about his work and passions, which, according to him, are more or less the same thing. Most of what he has learned over the years has been with the help of his friends and colleagues. Other than working within the same team or on the same code base, they have encouraged him to read books and attend inspiring conferences, such as XP Days, Italian Agile Days, and others that have helped his growth.
Read more about Ferdinando Santacroce