What is the good VCS to use for 1 programmer using 2 separate computers?
I am learning to program in C# on Windows. A developer friend suggested that since I am just starting out, it might be a good idea start using VCS so I get used to it. I have been reading up on Git, Mercurial, and Bazaar and I am having a hard time picking between them. I have looked at number of posts on SO asking s开发者_开发百科imilar questions but haven't found any dealing with using VCS on separate computers by same user.
So before even worrying about which VCS to use, is what my friend suggested true -- get into the habit of using VCS for any/all projects or is that an overkill?
If it is a good habit, then I am looking for a solution with following requirements:
- I program at home and at work. I need to be able to push/pull regardless of where I am (using different computers).
- I am a privacy nut, especially since I am just starting out. I would prefer private respository rather than public / open. Or am I being too paranoid? I am not against open source but as a beginner, I would like to keep my work private (for now anyways).
- I would like to be able to use VCS for multiple projects (small projects for now but I hope to tackle bigger projects later)
- I am a Windows guy so Windows and Visual Studio integration / support would be a huge plus
My current VCS method:
- Use carbonite for daily backup
- Use Windows Mesh to sync files between home and work computer
- Comment out old code for changes with date/time and reason for change
Lets just say that I could do better.
Any and all comments are greatly appreciated. Thank you.
Using version control is definitely a good habit to get in to and provides a few benefits for the solo programmer:
- You can keep your history and the reasons behind them out of your code which will make it tidier and easier to read.
- It allows a sort of cushion for messing up - you can code with the confidence that you can always get back to where you started if it all goes horribly wrong.
- In your personal situation it would allow for easy synchronisation between your computers although you do have a solution for that already.
I can't really give a good comparison of the different version control systems that you talk about as I haven't used Bazaar and I only used Git for a short while to evaluate it (3 years ago - I didn't choose it because the Windows clients available weren't very good but that was 3 years ago and software changes a lot in that time)
I think that the version control system doesn't really matter much for your situation. I'd say that you should have a quick play with each of them and decide which is better for you. The differences in the underlying source control systems are unlikely to affect you as much as the quality of the clients.
I have used Mercurial and can say that TortoiseHg and VisualHg are both good clients for Windows. TortoiseHg integrates with Windows Explorer (but also has a standalone client if that's what you want). VisualHg is a Visual Studio addon which integrates TortoiseHg with VS.
You might be able to keep using Windows Mesh to keep the work and home repositories in sync if you really don't want to use a public source control provider. I would recommend against it though - purely for the reason that it seems like Windows Mesh would be doing a job that the source control system is specifically designed to do.
I use bitbucket.org (for Mercurial) - it's free to use and you can have as many private repositories as you want.
I would strongly recommend using version control for all projects. One very strong benefit is that it allows you to easily work with different branches, which is very helpful for developing new features and maintaining multiple versions (e.g. project X at work uses version n so you need to maintain it, but you're interested in developing version n+1). Also, should you ever want a programming job, many employers won't take you seriously if you don't use version control.
As to specific requirements:
I program at home and at work. I need to be able to push/pull regardless of where I am (using different computers).
Any distributed version control (DVCS) will support this easily. Fortunately, git, mercurial, and bazaar are all DVCS, so you'd be good with any of them.
I am a privacy nut, especially since I am just starting out. I would prefer private respository rather than public / open. Or am I being too paranoid? I am not against open source but as a beginner, I would like to keep my work private (for now anyways).
Any VCS will support this, although it does negate some benefits for some VCS choices (e.g. github).
Out of the three you've mentioned, I think bazaar and mercurial have the best windows support. Both have visual studio integration to at least some extent. I agree you should try them out before choosing, probably in the order of bazaar, mercurial, git.
精彩评论