History

Because of the centralized nature of TFVC, some pieces of information are not available when you are not connected. File history is not replicated to the client's development machine and can only be viewed when you are online with the server. This information is viewable via Visual Studio and the web portal. Via the context menu of an item, you can annotate files to see who changed a line, and when they changed it. The following screenshot shows what sort of information is given in the web portal:

With Git, file history is replicated on the client's development machine. You can also view it when there is no connection to the TFS server. You can view history in Visual Studio and on the web portal, as well as on the specific Git server you are using, such as GitLab. By using Git's command option, you can find out who changed which lines in a file, and why. It can be a useful tool for identifying changes in your code as annotation is in TFVC. See the following git blame command:

$ git blame BSDLicence
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 1) The files
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 2)
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 3) !PDF.Res
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 4) !PDF.Sprites
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 5) !PDF.Sprites22
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 6) !PDF.Messages
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 7) !PDF.Documents.Help/html
e2cc9eb2 (peter 2010-01-08 20:35:51 +0000 8) !PDF.Documents.Help/txt

We can see that peter changed this file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.160.216