Reader small image

You're reading from  Git Essentials - Second Edition

Product typeBook
Published inNov 2017
Reading LevelBeginner
PublisherPackt
ISBN-139781787120723
Edition2nd 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

Obtaining the Most - Good Commits and Workflows

Now that we have acquired some familiarity with Git and versioning systems, it's time to look at the whole thing from a much higher perspective, to become aware of common patterns and procedures.

In this chapter, we will walk through some of the most common ways to organize and build meaningful commits and repositories, obtaining not only a well-organized code stack, but even a meaningful source of information.

The art of committing

While working with Git, committing seems the easiest part of the job: you add files, write a short comment, and then you're done. But it is just for its simplicity that often, especially at the very beginning of your experience, you acquire the bad habit of doing terrible commits: too late, too big, too short, or simply equipped with bad messages.

Now we will take some time to identify possible issues, like unmeaning or too large commits, drawing attention to tips and hints to get rid of those bad habits.

Building the right commit

One of the harder skills to acquire while programming in general is to split the work into small and meaningful tasks.

Too often, I have experienced this scenario: you...

Adopting a workflow - a wise act

Now that we learnt how to perform good commits, it's time to fly higher and think of workflows. Git is a tool for versioning, but as with other powerful tools like knives, you can cut tasty sashimi or get hurt.

The thing that separates a great repository from a junkyard is the way you manage releases, the way you react when there is a bug to fix in particular version of your software, and the way you act when you have to make users able to beta-test incoming features.

These kinds of actions belong to ordinary administration for a modern software project, but too often I see teams out of breath because of the poor versioning workflows.

In this second part of the chapter, we will take a quick look at some of the most used workflows together with the Git versioning system.

...

Summary

In this chapter, we became aware of effective ways to use Git; I personally consider this chapter the most important for the new Git user, because it is only by applying some rules and discipline that you will obtain the most from this tool. So please pick up a good workflow (make your own, if necessary!), and pay attention to your commits: this is the only way to become a good versioning tool user, not only in Git.

In the next chapter, we will see some tips and tricks for using Git even if you have to deal with Subversion servers, and then we will take a quick look at migrating definitely from Subversion to Git.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Git Essentials - Second Edition
Published in: Nov 2017Publisher: PacktISBN-13: 9781787120723
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

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