Saturday, October 24, 2015

CVS Vs GIT Vs TFS

As we know, three of them are for source version control.
Long time ago i compared some source controls in this post . I felt that it will be nice if I can further write my opinion on them.

CVS and GIT having free version.
TFS need payment.

In my opinion:

CVS are very straight forward and easy to use. You can set it up and check in the code, with 1 step, your partner can get your source code. But cvs is very dangerous, because it doesn't warn you for conflicts. It can be useful if you always have the major all time mighty latest powerful code in your local that you can save to overwrite other code. Else, it can be disaster when you end up spending hours to debug just to finally noticed someone overwritten the code. Tracing can be really easy because you just need to right click, select cvs -> history. then you can see the history of this file's changes. BUT, again but, it can be not helpful if you what to know what else you had checked in regarding to the same working item. Comparison of code is available. select the history, click on two versions, ( can be version 1 and version 10, hold alt key for the second selection, but only compare 2 files at 1 time.) selection option: compare.  



GIT can be in free version or the one that enhanced by Microsoft. Maybe the intention is to attract GIT people to pay them for some extra features. ( :D ) GIT can be consider a little hassle to me, maybe because I haven't get used to it, but the real reason for this statement is because it can have many repository. The facts that a lot of repo (repository) can cause confusion and  more works . For example, to have multi branching  to control your code, eg: ReleaseRepo and DevelopmentRepo. where DevelopmentRepo is a child from the ReleaseRepo ; now, imagine you need to check in codes. you need to go to the physical location of the files and pull latest changes for both of them. Then if you took too many time to reconfirm your code, you might having conflict error that stops you from checking in.
This seems to be a problem even to TFS, isn't it? Yes it is. But what TFS can provide is the pretty little workspace that allow me to do all the get latest from the  visual studio. ( So that i can always have my VS opened. :D ) Managing code become easier that way, to my opinion.

Both GIT and TFS allow a easy batch tracking for what files you checked in for a certain changes. But there is a different, GIT only able to show you the batch check in files when you select to trace them in history. TFS able to show you the whole list of changes as long as they are tied to the work item that they check-in to. However, this is totally depends on your check in policy. Where if you doesn't enforce any check-in policy, you TFS can be same as GIT in this point.

Comparison of files for GIT and TFS is same as CVS. But the later two having advantage where they allow the tagging of checked-in user for each line of code. GIT however have a name that irritate me, which is "Blame", where i found it really negative.. TFS gave a better name, annotate.

GIT and TFS can have something really nice where you can 'on-hold' your code and get the latest. For CVS, you might need to rename your file or get the other version of code with different name. GIT called it stach while TFS named it as shelveset. Again the naming on TFS sounds better to me.

As you used to a type of source control, you will get familiar with it and felt that it is the best to use, but sometimes, we need to aware what they have in common and not. Whatever source control you plan to use, it is always good to have one of them than none at all, because we always should have a backup of previous code. We doesn't have time machine to turn back the time in real life, but we have this source control that can do some time travelling for the code. Why not making that happen? Sometimes, we want to know what if i revert and re-do it with another approach, will it goes better? Or you know you did something bad, and you just want to reverse the time back to where it was used to be in good shape... :)




No comments:

Post a Comment