C# methods in git diff hunk headers

added by DotNetKicks
1/17/2017 9:39:33 PM

1 Kicks, 539 Views

January 17, 2017 - Thomas Levesque If you use git on the command line, you may have noticed that diff hunks often show the method signature in the hunk header (the line that starts with @@), like this: diff --git a/Program.cs b/Program.cs index 655a213..5ae1016 100644 --- a/Program.cs +++ b/Program.cs @@ -13,6 +13,7 @@ static void Main(string[] args) Console.WriteLine("Hello World!"); Console.WriteLine("Hello World!"); Console.WriteLine("Hello World!"); + Console.WriteLine("blah"); } This is very useful to know where you are when looking at a diff.


0 comments