tags:

views:

285

answers:

10

Hello

Now I make every time a zip file of all my files to make backups. But then I heard about svn und later I read that git is "better" than svn. Can someone suggest me with which I should start learning?

A: 

start from svn, it's concept is easier. then go with git, it's much more powerful.

Jason
If you're going to go to git, I wouldn't start with svn. If you're only just starting to learn VCS concepts it will only hinder the learning process to switch tools in the process and svn and git have a very different view on things.
Charles Bailey
git is different from svn, but not that much in my opinion. otherwise we won't have a git-svn bridge...
Jason
@Jason: Clearly there is an *enormous* difference between distributed and centralized VCS.
Jefromi
@Jason: I second Jefromi's comment: see http://stackoverflow.com/questions/161541/svn-vs-git/2549128#2549128. They are *fundamentally* different.
VonC
@nusbit is asking about where to start. To start with a VCS, he need to learn the basic concepts: checkout(pull), checkin(push), branch, merge. svn and git are the same at this concept level, or they won't be both called "VCS". Distributed/centralized is a choice of technical implementation, not the concept.
Jason
@Jason, well, about that merge thingy. SVN does it file-by-file and poorly, Git merge at the full tree level and seamlessly. Both are merges, but Git will offer a better experience. And DVCS is not just an "implementation", but it introduces the new **concept** of publication (orthogonal to branching). See http://stackoverflow.com/questions/2563836/sell-me-distributed-revision-control/2563917#2563917
VonC
@VonC, thx for the links. I admit DVCS has a lot of evolution than the centralized VCS. But please forget all those fancy words for a while, let's think about their basic user requirements: version control.
Jason
@Jason: com'on. You can keep thinking about a bike (SVN) and a car (Git) as both tools fulfilling the same basic requirements (accelerate, brake, turn), but if you imagine one second that you can do "the same thing" with both vehicle, you are (imho) mistaken. Actually certain massive repositories (with lots of files and binaries) could only be managed with SVN. And some complex merge workflow will only be managed with Git. Limiting oneself to the "basic requirements" and getting to the conclusion you can use one or the other tool is not seeing the full picture.
VonC
+5  A: 

Neither is "better" than the other; both serve different needs. Subversion is a centralized system; Git is distributed. In Subversion, there is one (and only one) server that everybody reads from and writes to; in Git, each developer has their own repository, and changes are shared by pushing and pulling between these.

If these are your personal files, I recommend to use Git. There is no central server, so it is easier to get started. That being said, Git has a somewhat steeper learning curve, and there are no really good graphical clients; in Windows, as in *nix, you're best off using the command line version.

Thomas
Thats why I wrote better in apostrophes.
Except GIT on Windows is a bit of advanced rocket science. And GIT's user interface is the worst nightmare of the UX designers. :-)
Franci Penov
Thanks, forgot about that. Edited.
Thomas
git on windows: http://code.google.com/p/msysgit/ .and there is a great git UI: GitX on OSX.
Jason
git is better period. you can easily work with it the same way as svn, only it is better technology.
Matt Briggs
@Jason - " No worry, this is easier than you think. Downloading and executing it will give you a working development environment and compile Git automatically!" - as I said, advanced rocket science. and the Windows GUI for Git is terrible. No, it's goddamn awful. It's a frightening sight; a nightmare coming to eat your brains. But it's getting better... :-)
Franci Penov
@Matt Brigs - "Git is a Harrier Jump Jet. And not in a good way" (http://reprog.wordpress.com/2010/05/10/git-is-a-harrier-jump-jet-and-not-in-a-good-way/) :-)
Franci Penov
@Franci - Git doesn't even need to be 'installed' on windows anymore as msysgit have a portable version. It took no more effort or time to get working on windows than linux. If downloading and unzipping are rocket science I need to update my business card.
mfperzel
@mfperzel - :-) steps to using portable msysGit: 1) download it; 2) figure out what .7z is; 3) find, download and install 7zip; 4) extract; 5) open cmd, add git to path; 6) git init, git add, git commit; 7) curse, set EDITOR=notepad.exe; 8) git commit again; 9) curse again, set EDITOR to devenv.com; 10) git commit again; 11) curse again as git does not understand spaces in paths; 12) git commit -m; 13) curse again; do git commit --amend --author='Franci Penov <francip@...>' as per git message; 14) curse again as git won't accept name with space; ... 35) give up and use TortoiseSVN
Franci Penov
@franci: 1) you can't assume git works like svn. Git works like modern SCM systems, SVN works like the previous generation. If you do not know modern SCM systems, that will be an additional thing to wrap your head around 2) git is a very powerful tool. you need to spend some time learning it. if something more straight forward is your cup of tea, try hg (just realize, it doesn't do as much). 3) if you are still developing on windows, git relies heavily on standard unix tools, so hg may be more appropriate for your circumstances.
Matt Briggs
to install for me: step 1) open a command prompt. step 2) type "sudo apt-get install git-core". step 3) profit!
Matt Briggs
@Matt Briggs - exactly what I've been trying to convey - **Git is not the best option for someone that just starts with version control**. (whether it is _the best_ version control is a separate topic... :-))
Franci Penov
i disagree. the only reason that it is more difficult is if someone has to unlearn the way svn works. if you start thinking about branches and changesets from the beginning, I don't think its really any "harder", its just different. where git gets harder is the more advanced stuff, but its not like that stuff is easier with other tools, generally it is impossible.
Matt Briggs
@Matt Brigs - branches and changesets _are_ the advanced stuff. (rocket science is also not hard, if you start thinking about space flight physics, jet propulsion and advanced composite materials from the beginning... :-))
Franci Penov
@Matt Briggs - btw, I am a bit confused by your previous comments. either "you can easily work with it the same way as svn" or "you can't assume git works like svn", but for sure it can't be both, right? :-)
Franci Penov
Ok, so if we are talking about svn checkout/commit/revert vs git clone/commit/push/checkout, git would probably be nominally harder. that being said, if you are a professional, you shouldn't be shying away from learning a tool cause it is a little bit harder. immediately, you will get significant speed improvements and better auto-merging with git. down the road, you will do stuff that is so far beyond svn that you will wonder how anyone could use something like that in this day and age. svn is infrastructure, git actually helps you work.
Matt Briggs
by "the same way as svn" i mean having a central server on the network that everyone pushes to and pulls from, as opposed to a distributed open source way (which git is really designed for).
Matt Briggs
@Matt Brigs - "you can use Git same way as svn" is like saying "you can use C++ same way as C#" and then clarifying "and by that I mean it doesn't have garbage collection and you have full control over memory management, but you can still create executables with it"
Franci Penov
@Franci: see my comments below (http://stackoverflow.com/questions/3103637/start-with-git-or-svn/3103667#3103667): Git and SVN being fundamentally different, it is interesting to realize there is more to "version control" than branches emulated as directories, and incredibly complicated `mergeinfo` properties all over the place. And a DVCS will introduce an orthogonal dimension to branching (push/pull) which is good to know (for complex publication workflow as well as simple backup purpose)
VonC
@Franci - Remember, with SVN you must have a server to use it. Which instantly makes it just as, or more, complicated than git to install. With all the steps you typed it takes 10 minutes to have a repository created and to begin using it. If you are unable to follow almost every beginner git tutorial and neglect to set your name you arn't going to have any luck using SVN either. The UI of Git might be a reason for a beginner to not use Git,(Use Mercurial instead if this is the case), but installation on windows is absolutley not one.
mfperzel
@VonC - Yes, I absolutely agree that learning both Git and SVN can be quite useful. I just think Git is not the right one to start with, mostly due to its complexity (which is the price to pay for its power, of course).
Franci Penov
@mfperzel - no, you don't have to have a server for SVN, you can use it with a local (as in on your own machine) repo. :-)
Franci Penov
@mfperzel - "The commands of Git might be a reason for a beginner to not use Git" - exactly what I've been trying to say all along. Git is probably the most powerful source control tool, but is way too complex for beginners and offers horrible user experience, especially on Windows.
Franci Penov
@Franci - I'm arguing specifically that it is not anymore "horrible" on windows than it is on Linux. It might have been bad on windows at one point, but it just isn't anymore. About using Git as a beginner, I think it provides so many common sense features that are extremely useful and really I've never liked SVN. I personally would recommend Git even to someone inexperienced with VCSs. If you can program you can learn to use Git. It is no where near as diffcult as some people claim. On the other hand, I do stand totally corrected about using SVN locally.
mfperzel
A: 

By all means, use something. Just having .zip files is asking for disaster.

If you've never used source control before, use SVN, since it's easier to grok for newbies. Once you've gotten the hang of it (or are working on a big team), you may want to switch to git or another distributed version control system.

JSBangs
A: 

If you are looking for something easy to deploy, have a look at fossil. It is a distributed versioning system like git, but consists only of a single executable. It provides a distributed wiki, ticket system, versioning, all in a self-contained web-server.

Your repository will also be a single file (a sqlite database).

http://www.fossil-scm.org

relet
A: 

Compared to making zip-file snapshots of code, both git and svn ( or Mercurial or even cvs) can dramatically improve your coding workflow. I'd suggest reading about what the differences are between the different version-control philosophies out there and pick based on how you code and who you need to share with (if anyone).

d.w.
A: 

You can start with easygit you'll get the simplicity of svn with the power of git!

Bauna
A: 

Learn both! Otherwise you will never value the advantages of a distributed system such as git.

Git will be just slightly harder, but on the long term you will appreciate much more over SVN, specially when branching. If you want to understand that you will have to learn with both. Sooner or later you will have to deal with both of them since they are so popular

I would start with git because probably it will be the one that you will stick to. And the transition to svn will be easier than the other way around (you will have to adapt to the limitations, not learning new concepts)

Francisco Garcia
+1  A: 

I personally recommend git - it's easy to work with, and you can mess with things without affecting the copy on the server. You can easily branch stuff off, and a server isn't even needed. If you do need a server, there's github, or you can just use any server with SSH. I never managed to grasp the workflow of SVN.. I'd recommend reading through http://whygitisbetterthanx.com/#svn/ too.

FrozenFire
A: 

Either option is much, much better than using zip backups. Personally I think that if you're learning from scratch i'd just go with one of the popular distributed systems - Git or Mercurial. I've not used Mercurial but the the more I use Git the more i'm glad I switched from SVN.

It used to be the case that you could only use Git on Windows with Cygwin, but it's perfectly fine these days thanks to Msysgit. TortoiseGit is also a decent GUI interface although once you've gotten a handle on things you'll find yourself doing most things on the command-line anyway.

Also, although Git does have a bit more of a learning curve to it than SVN, its distributed nature makes it very easy to get started with (just cd into a directory and type 'git init' and you're good to go).

The ProGit book by Apress is also available online and a decent reference.

richeym
A: 
  • If you plan on working anywhere that does programming, chances are high that they will use SVN. You'll need to learn it at some point.
  • I would personally recommend learning Mercurial at some point, because it's the bee's knees. In my opinion it combines the best parts of SVN with some good concepts from git.
Ender