Using Source Control [closed]

2019-01-25 20:13发布

I am a very new programmer, I have made a couple basic applications, however I was told that it would be good to get used to using "source control" at the near the beginning of learning so I get accustomed to it. I have gathered that source control is what is used to manage programs with multiple programmers and that it is somehow connected directly to my projects in Visual studio. I also believe there are two primary versions, "TFS" and "SVN". Past that I am fairly lost, I am not sure what I need to actually implement this, specifically how I would do so on my personal projects. Also I don't know what program(s) are needed.

Should I use TFS or SVN? What program(s) do I need to install? How do I implement them in Visual Studio? Is it a good habit to get into for my personal programming or would you disagree?

8条回答
来,给爷笑一个
2楼-- · 2019-01-25 20:37

You should not usually host your own subversion/git/whatever server. It is time consuming and error prone. For small projects subversion and git hosting can be found for free, and give you offsite backup, the ability to work from anywhere and the ability to add offsite programmers to a project with ease. If your needs grow, you can pay a small monthly fee.

You can use a google search to find candidates. The one I use is http://unfuddle.com.

查看更多
冷血范
3楼-- · 2019-01-25 20:50

Of the source control systems I've used Subversion with Tortoise is my preferred choice (I've used VSS, Subversion (SVN) and TFS).

Subversion has some excellent documentation on how it works and also on the general concepts of version control so that you actually understand what you are doind and why.

If you want to set up Subversion on a Windows stack then by far the easiest way is with VisualSVN which is free. The client side plug in to Visual Studio, however, is not free. But there are many free alternatives such as Tortoise.

查看更多
Animai°情兽
4楼-- · 2019-01-25 20:51

check out Git and think about hosting your projects on https://github.com/ - also, check out linus talk on git: http://www.youtube.com/watch?v=4XpnKHJAok8

查看更多
成全新的幸福
5楼-- · 2019-01-25 20:51

I found this article to be very clear. (It recommends SVN).

查看更多
We Are One
6楼-- · 2019-01-25 20:52

there are many different source control providers including TFS, Subversion (SVN), Perforce, CVS and Visual Source Safe to name but a few. It is also one of those areas that people tend to get semi-religous on, so I'll tread carefully!

I think most people would agree that Visual Source Safe is not the way to. It is fairly simple as a source control system but would do little to teach you about source control in general. TFS, SVN and Perforce tend to get pretty good feedback from their users.

Out of these, SVN is the only one that is free, so if you are planning to do this as a learning exercise, I'd be inclined to start there [actually I believe you can get a free 2 user license for Perforce too, but I'm not 100% sure on that). You can learn all the basics with this, as well as more advanced areas such as branching and merging.

If you do give it a go, I recommend you download SVN itself, and the TortoiseSVN client for Windows Explorer (I'm assuming you are on Windows here as you mention Visual Studio). You may also want to look at source control integration into Visual Studio, in which case I use VisualSVN (there is a free trial), but there is another popular one whose name eludes me (someone will hopefully add it as a comment).

Additionally there is a great, free, e-book for SVN, available (here)

Overall - to answer your specific questions:

Should I use TFS or SVN?

SVN

What program(s) do I need to install?

SVN itself (the server) and TortoiseSVN

How do I implement them in Visual Studio?

Use VisualSVN or another SVN for Visual Studio client. You don't need this to learn source control, but it is well worth trying it out from in the IDE.

Is it a good habit to get into for my personal programming or would you disagree?

Yes, definitely!

Good luck, and hope you enjoy getting into source control.

查看更多
爷、活的狠高调
7楼-- · 2019-01-25 20:57

The source control system is separate from your IDE. You can use it from the command line, or from a graphical client as well as from your IDE.

What you should know about a source control system is this:

  • you save your increment changes to the SCM (source code management), and each save receives an unique id/revision
  • you can retrieve any revision on any time, therefore changes are never lost
  • this gives you the liberty to delete unused code, debug info, or to refactor existing functionalities
  • and most importantly, it gives these functionalities to all members of a team, so that the team can work at the same time on the same code base, from their own development machines

You could start with svn, as it's very popular (especially for open source projects) with widespread support. You can gen the command line client from here:

http://subversion.tigris.org/

This is a nice graphical interface (windows):

http://tortoisesvn.net/

This is a free book to help you start with svn:

http://svnbook.red-bean.com/

If you need to setup a server on your development machine, this tutorial should help:

http://blogs.vertigosoftware.com/teamsystem/archive/2006/01/16/Setting_up_a_Subversion_Server_under_Windows.aspx

查看更多
登录 后发表回答