Reader small image

You're reading from  Git for Programmers

Product typeBook
Published inJun 2021
PublisherPackt
ISBN-139781801075732
Edition1st Edition
Right arrow
Author (1)
Jesse Liberty
Jesse Liberty
author image
Jesse Liberty

Jesse Liberty is a full-time hands-on programmer, specializing in C#, git and .NET MAUI. He hosts the popular Yet Another Podcast and is the author of more than a dozen best-selling programming books. Liberty is a Certified Xamarin Developer, a Xamarin MVP and a Microsoft MVP. He was a Technical Evangelist for Microsoft, Distinguished Software Engineer at AT&T; Software Architect for PBS and Vice President of Information Technology at Citibank, and he was on the teaching staff at Brandeis University. Jesse is a recognized expert and has spoken at conferences world-wide.
Read more about Jesse Liberty

Right arrow

What's in that push?

From the command line, we can use the git show command:

Figure 4.2: Examining the push

There's a lot of information here. First, we see the author and the date. Then we see the message that was attached to this commit (Add properties). Next, Git does a diff (difference) between Book.cs and Book.cs naming the first one a and the second b. The one labeled a is Book.cs before this commit, the one labeled b is the new contents in this commit.

You may have noticed the line that says /dev/null. This indicates that a file is being compared against nothing, and thus everything is new.

The next line shows that /dev/null is being compared against file b (the new Book.cs file):

Figure 4.3: Comparing against dev/null

What follows are the changes. Deletions will be marked in red, modifications in green, and new code in yellow. (This display and these colors may depend on which shell you are using.) We see here that three using statements...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Git for Programmers
Published in: Jun 2021Publisher: PacktISBN-13: 9781801075732

Author (1)

author image
Jesse Liberty

Jesse Liberty is a full-time hands-on programmer, specializing in C#, git and .NET MAUI. He hosts the popular Yet Another Podcast and is the author of more than a dozen best-selling programming books. Liberty is a Certified Xamarin Developer, a Xamarin MVP and a Microsoft MVP. He was a Technical Evangelist for Microsoft, Distinguished Software Engineer at AT&T; Software Architect for PBS and Vice President of Information Technology at Citibank, and he was on the teaching staff at Brandeis University. Jesse is a recognized expert and has spoken at conferences world-wide.
Read more about Jesse Liberty