2014-02-28 5 views

Antwort

5

Es bedeutet, dass für .cs (CSharp) Dateien wird Git text diff=csharp als Merge/Diff-Modus verwenden.

Dies ermöglicht Git eine höhere Wahrscheinlichkeit von Erfolgsraten beim Zusammenführen zu haben.

Siehe auch the gitattributes doc, in dem es heißt:

Setting the text attribute on a path enables end-of-line normalization 
and marks the path as a text file. End-of-line conversion takes place 
without guessing the content type. 

und

There are a few built-in patterns to make this easier, 
and tex is one of them, so you do not have to write the above 
in your configuration file (you still need to enable this with the attribute mechanism, 
via .gitattributes). The following built in patterns are available: 
[...] 
csharp suitable for source code in the C# language. 
2
*.cs 

bedeutet, dass alle Dateien, die mit CS- als Dateierweiterung.

diff 

Das Attribut diff beeinflusst, wie git diffs für bestimmte Dateien generiert. Es kann git mitteilen, ob ein Textpatch für den Pfad erstellt oder der Pfad als Binärdatei behandelt werden soll.

geeignet für den Quellcode in der Sprache C#.

1

Er weist Git an, eine Text-Zusammenführung für alle csharp-Code-Dateien zu verwenden.

Es macht auch die Diff-Informationen für die Commit-Sprache spezifisch. Dies bedeutet, dass Sie sehen können, welche Methode des Codes das Diff gemacht hat, indem Sie den Header des Commits betrachten.