24
votes

Possible Duplicate:
Version control for independent developers?

I was wondering if there is a tool out there which acts as Visual Source Safe but only on local machine. Basically I would like to check in and check out on my local machine when I am codeing on my personal project from home.

2

12 Answers 12

32
votes

One word, just one: Git.

It's light, very easy to use, and there are lots of great resources to get you started. Mercurial is an excellent---and likewise free---tool as well. The reason for git over Mercurial is that sometimes, especially at work, I find that there are branches that need to GO, and GO quickly before the boss sees them. Git makes this easy, Mercurial, by a conscious choice, makes it near-impossible.

I use git on my work Windows machine, then go home to a nice, relaxing session on FreeBSD.

And, of course, Git integrates into Visual Studio:

https://stackoverflow.com/questions/507343/using-git-with-visual-studio

On my work machine, I use Git installed from Cygwin and it took me about twenty minutes to set up both. There are GUIs for Git, but you won't really need them: they are especially helpful when merging, but since I am the repository's only user, I don't have much of a problem resolving conflicts with myself. (The meds help ;) )

Not to make this too much into a git v mercurial fight, but the other advantage of Git is the larger user base, on this site as well as in the "wild," this translates into better support and potentially more future development.

On the other hand, .NET people seem to prefer Mercurial.

But the best part, is that if you choose either, its not like you're stuck. There are lots of good conversion utilities between the two, and they are similar enough that once you learn one, you won't have a hard time with the other.

9
  • 13
    I prefer Mercurial too because it's easier to learn than Git. Jun 21, 2011 at 3:11
  • 1
    Either would be an excellent choice, but I will add that using hg strip or selective cloning makes it fairly easy to remove branches from Mercurial. Otherwise, totally on point.
    – Ben Burns
    Jun 21, 2011 at 4:31
  • 3
    Both mercurial and (especially) subversion have much better tools than git for integrating with the OS and visual studio. For a one-man project, that's the most important thing. Jun 21, 2011 at 4:35
  • 2
    +1 For Mercurial (and Git too, I guess, hehe). Some answers specify bitbucket or Bazaar and I would like to throw Kiln out there. It's free for up to two developers. The best part is the product is simply amazing and the support is even better.
    – Pete
    Jun 21, 2011 at 5:30
  • With strip and rebase it's easy to manage history in Mercurial too. The GUI client (TortoiseHg) supports these commands as well.
    – Macke
    Jun 21, 2011 at 8:01
21
votes

You can set up something like Subversion or Mercurial to run on your local machine.

I would highly recommend, however, using an external hosting service. This will enable you to have a backup somewhere else. Should something happen to your computer, your code is safe somewhere else and you can retrieve it later. A distributed source code control system like Mercurial or Git will provide the best of both worlds - a local repository as well as a remote repository. I would recommend looking at your options and seeing what works best for you when I choose a particular implementation, though.

7
  • 2
    Not to blow the git horn even louder, but setting up a public repo on your own machine is easy as pie in git, so you don't need a specialized code hosting site like github. @Thomas : I'm sure Mercurial is similarly endowed, is it?
    – Dmitri
    Jun 20, 2011 at 22:14
  • 1
    @Dmitri I've never used Git, but yes, it's fairly simple on Mercurial. It took me about 10-15 minutes, and that was the first time when I was switching between the docs and actually doing things.
    – Thomas Owens
    Jun 20, 2011 at 22:17
  • takes 1 second with git, cd to your projects directory and do git init and you are ready to start committing code.
    – user7519
    Jun 21, 2011 at 2:57
  • 1
    Mercurial is as easy as git. hg init... probably takes less than a second.. ;-P
    – Macke
    Jun 21, 2011 at 7:45
  • I prefer using TortoiseHg. Just make folder and create a repository using the right-click context menu. Sure TortoiseGit can do that too.
    – Svish
    Jun 21, 2011 at 7:54
16
votes

I like to use Mercurial but any one of the many Distributed Revision Control should do the trick. They allow you to create repositories on your own hard drive and commit to them as well as be able to commit to dropbox [Note: that is for Mercurial, I know you can do the same with Git).

4
  • dropbox is a terrible solution, just imagine what happens when you do a compile and all those binaries get created in the dropbox folder and start saturating your connection with them being uploaded and synced, then you do a clean and another compile, ridiculous trying to develop out of a networked directory.
    – user7519
    Jun 21, 2011 at 2:59
  • While I use a Mercurial solution now, I used Dropbox in the past. It was fine for smaller projects and only once in a long while would I have issues with files being locked by the dropbox client for syncing. That said, I wouldn't recommend dropbox for that purpose but I would argue that it's better than nothing.
    – Pete
    Jun 21, 2011 at 5:25
  • 1
    @Jarrod Robertson - I think you misunderstood, Jetti was suggesting using dropbox to store a remote clone of your repository, leaving the working directory along with the local repo on the local machine.
    – Mark Booth
    Jun 21, 2011 at 10:24
  • 1
    @Mark - Thanks Mark, you are correct. @Jarrod - If you look at the link, you'll see that you use dropbox like you would github or bitbucket. That way you won't lose your repo if your hard drive crashes.
    – Jetti
    Jun 21, 2011 at 12:37
16
votes

Just get a Bitbucket account. They give you unlimited free private Mercurial and git repositories.

1
  • I didn't know about Bitbucket. This is good information. Thanks.
    – jatrim
    Mar 3, 2014 at 18:48
4
votes

I really like to use Bazaar. I'll agree that other distributed version control systems, such as Mercurial or Git, should work nicely, too.

I've found bazaar to be simple to use and easy to get started with. I find there is so little friction in its use that I use it even for tiny projects -- like a one-off script. Take a look at "Bazaar in five minutes". As with other tools, there are graphical ways to work if you prefer it to the command line. Bazaar Explorer comes with a standard installation of Bazaar.

4
votes

As you have several choices today, because of the explosion of decentralized source control softwares, so you need to choose a philosophy because every solution I'm listing here does provide "local version control" :

  • git : +community is big, +fast, +very flexible, +github is great, -really unix environnemnt oriented, -community is made of fanboys, -the commands looks alien, -requires understanding implementation to use well, -lacks of good gui (if you use one- tortoise-git is not as good as tortoise svn or tortoise hg - unrelated projects)
  • mercurial (hg) : +looks like git but in a more understable way, +rely on python:naturally cross-platform, +don't requires understanding internals, +easy to extend, +tortoiseHG is great!, -looks like for very big projects, it might be less flexible than git, but I have yet to understand this statement, -bitbucket is great but far less than github, same with google code hosting;
  • bazaar: +like mercurial but is built with C++ if I'm correct, +associated with launchpad that is associated with ubuntu, +integrated gui tool, -less used and less known that the alternatives, -last time I checked, it was known to be slower than mercurial;
  • fossil: +made for small teams, +provide bugtracking, wiki, forum and others tools inside the repository (!), +one unique executable for everything, -they say themselve that it's not meant to replace git (or mercurial or bazaar) but might fill the need for a complete compact solution for a small team;

I go with mercurial because it's simple to understand but let you taste what it is to work with a DCSVC tool without worrying about what commands mean what and if it will still work on windows...

In fact for most of my mini projects I just hg init the project folder and start to spit code, then commit, commit commit commit commit until I'm satisfied, then decide to clone it somewhere else or to let it there. If you want to go this way, any of those solutions works, but mercurial + TortoiseHg (that is cross-platform) is my personal choice.

1
  • 2
    Bazzar and mercurial are mainly python - git is C but if you use the command line you don't need to know
    – mmmmmm
    Jun 20, 2011 at 23:31
3
votes

Fossil is a great solution for very small teams, even teams of one. It supplies all the usual features you'd expect of a modern version control system. In addition, it provides a wiki and a ticket tracker that are also stored in the repository. Remember that even as a solo developer, you are still in a collaboration of sorts with your future self; a trouble ticket tracker can be very helpful as a reminder of things that you will need to do later, even if you never make it publicly available to your end users.

When you discover that keeping a second copy of a repository is a cheap way to get off-site backup, it is easy to arrange. The fossil executable can act as a web server and as a CGI back-end to a full-featured web server to provide for remote access and synchronization.

Personally, I like the fact that it is low-ceremony, and only barely installed even on a Windows system. Drop the executable somewhere in your path, and it's installed.

Use fossil create or fossil clone to get a repository to work with; fossil open to set up a workspace; fossil ui to configure your local copy of the repository with your web browser; fossil changes and fossil extra to find out what's changed; fossil add to put files under its control, and fossil commit to commit your edits.

Fossil certainly isn't the only choice. But its a choice I am personally very happy with, for over a year now, and for several small to mid-sized projects both at work and at home.

2
votes

Subversion and Git are the most popular options. I'd recommend looking for a good free GUI for each of them for that OS that you are on. Then you can compare which do you like more...

2
votes

Assuming you are running windows, VisualSVN is a great way to get Subversion up and running in no time. I've been using it for about a year now and never had any problems with it. It's all the power of subversion with intuitive visual interface.

Free version covers everything I need for personal use including web access. As for clients, TortoiseSVN is a no-brainer when it comes to desktop. If you use Visual Studio, AnkhSVN is a very good option, it works and it's free.

I am more familiar with SVN so I was looking in this direction specifically. Maybe Git or Mercurial or something else provides some benefits. But if the ease of installation and configuration counts, the setup I described is pretty good, at least for me

1
vote

If you are looking for a tool acts as VSS, you can try SourceAnywhere Hosted. As a SaaS service, it is light. You can sign up for a free plan for personal user (it seems Dynamsoft doesn't public the free plan link.). They also have paid plans if you are interested in.

1
vote

I like SourceGear Vault. It integrates nicely into pretty much every major IDE out there, including old ones (e.g. VB6), if you ever need to polish up some old code.

And it's free for 2 users, which is one more than I need.

3
  • Vault, seriously? I haven't used anything worse than that, other than maybe PVCS. Jun 21, 2011 at 19:43
  • @Charles What is wrong Vault? It's perfectly fine. I used it in both multi-user environments and consulting gigs. Works great. Jun 21, 2011 at 21:47
  • Incredibly unstable and the tools for doing anything beyond a basic checkin/checkout are way behind everything else. Jun 22, 2011 at 1:08
-1
votes

I Use git with congestion with github, but ive heard mercurial is also a cool approach.

Not the answer you're looking for? Browse other questions tagged or ask your own question.