|
|
Subscribe / Log in / New account

Git rocks!

Git rocks!

Posted Dec 21, 2005 22:16 UTC (Wed) by Junior_Samples (guest, #26737)
In reply to: Git rocks! by astrophoenix
Parent article: Git 1.0.0 released

So, what's the verdict? Would you give up CVS for Git? Or are you mainly using Git because it's compatible with the kernel sources? In what way does Git trump CVS? Inquiring minds want to know!


to post comments

Git rocks!

Posted Dec 21, 2005 23:09 UTC (Wed) by iabervon (subscriber, #722) [Link] (2 responses)

(disclaimer: I'm a git developer, and clearly biased)

I'd say that the huge advantage of git over everything is that it's dead simple to interface with. So you can say, "I wish I had a revision control system that worked like this," and it's a couple of shell scripts to do, and the results are compatible with everybody else. (For example, I've got a 237-line Python CGI that lets you edit files in the a git repository on the web, and then commit sets of changes. This required a dozen-line patch to an obscure part of git, and that only because I was the first person to try to work with no working tree and no temporary files. Try doing that with cvs, or practically anything else.) More generally, it means you can really integrate revision control into your processes however you want, rather than just following the VCS's idea of how you interact with it.

It's also got a lot of useful scripts included, like "bisect", which sequentially checks out versions from the history, doing a binary search for the first version to show a bug you're tracking down.

My favorite thing about using it for day-to-day version control is this: in most VCSes, you have to merge changes from other people before you can commit. In git, you commit before considering whether to merge changes from other people; you only have to merge changes before you advance the common head version. Also, you can commit a ton of hacks, keep them private but safe in case you screw up the next thing, clean things up once the whole thing is ready, and then rewrite history before you show anyone, so what goes into the shared history is that you did only the right thing. You can also pretend that you're the maintainer of a project, and the official maintainers are contributing patches to you when they make releases. It's all just a matter of perspective.

It can be a bit confusing at times, but only when you've done something far beyond the capabilites of cvs anyway, at least in my experience.

Git rocks!

Posted Dec 21, 2005 23:27 UTC (Wed) by astrophoenix (guest, #13528) [Link] (1 responses)

my usage of git is still very simple; how would you suggest learning to do
the things you just mentioned?

Git rocks!

Posted Dec 22, 2005 0:02 UTC (Thu) by iabervon (subscriber, #722) [Link]

There's no reason to learn to do a lot of complicated things that somebody else has thought of. Once you have a good familiarity with the commonly used scripts, you can look through the documentation for the executables to figure out how the scripts work, and then, when you have something that's unusual that you want to do, it's pretty easy to use the plumbing commands to do it by hand, and then you can write a script.

But the neat thing about git is that the complicated things I do can be particular to my usage pattern, and I can write support for them without bothering the 90% of users who want different unusual features. (AFAICT, I'm the only person who uses multiple working trees with a single repository that they're symlinked to; also, I've got a script to rewrite private history that I haven't sold anyone else on yet). The nice thing is that your version of git doesn't need to support the same user-level operations that mine does for us to work together without being aware that the other is using special commands, so git doesn't get as much bloat as it would if everybody had to agree on a version.

If there are particular examples from my list that you'd like explained or if you want to beta-test my history rewriting script, let me know. I was sort of rambling and hit a bunch of obscure operations as examples of things that I like, so I don't really want to explain all of them if you only actually want to do a few of them.

Git rocks!

Posted Dec 21, 2005 23:25 UTC (Wed) by astrophoenix (guest, #13528) [Link] (1 responses)

oh yes, I would be happy if CVS vanished off the face of the earth. I'm
forced to sync with a cvs repo right now.

my 3 favorite things about git are

1. changesets (1 commit takes in the changes to multiple files)

2. distributed development (you can hack and commit all day long on your
laptop with no network, sync up all the changesets later)

3. gitk: a simple, yet incredible visualization tool. I routinely
cvsimport code into git just so I can run gitk on it.

Git rocks!

Posted Jan 6, 2006 17:14 UTC (Fri) by eli (guest, #11265) [Link]

my 3 favorite things about git are
1. changesets (1 commit takes in the changes to multiple files)
Also true for svn, monotone, arch, mercurial, bazaar-ng, etc. Basically, anything but CVS.
2. distributed development (you can hack and commit all day long on your laptop with no network, sync up all the changesets later)
Also true for monotone, arch, mercurial, bazaar-ng, etc.
3. gitk: a simple, yet incredible visualization tool. I routinely cvsimport code into git just so I can run gitk on it.
I hadn't seen this before... I like the look of that. (Though the visualization aspect of that could be done for any of the distributed tools since the underlying structure fits.)
git has some interesting aspects, don't get me wrong. I'm just wondering if it's really better than monotone or bazaar-ng, the two options I find more interesting.

Git rocks!

Posted Dec 22, 2005 12:09 UTC (Thu) by zooko (guest, #2589) [Link] (5 responses)

If you are going to compare CVS to git, please continue some of the other alternatives.

I maintain a concise list.

http://www.zooko.com/revision_control_quick_ref.html

My current favorite is darcs. Truthfully, I'm not aware of any advantage that git has over the others, except that it is supported by the kernel hackers and is optimized for working on the kernel.

Git rocks!

Posted Dec 22, 2005 14:27 UTC (Thu) by evgeny (guest, #774) [Link] (4 responses)

Is there a single one of them exporting a decent C API? So I can add version control to my app with no need for ugly stuff invloving fork/execve/...?

Git rocks!

Posted Dec 22, 2005 15:35 UTC (Thu) by zooko (guest, #2589) [Link] (1 responses)

That's a good question. I know the answer for darcs: definitely not.

On the other hand, there is a reasonable amount of scripting going on with darcs: two web interfaces, integration with Trac, a dependency-graph generator.

If you find out about C interfaces for rev ctrl systems please post here or e-mail zooko@zooko.com.

Git rocks!

Posted Dec 22, 2005 20:42 UTC (Thu) by evgeny (guest, #774) [Link]

OK, apparently, subversion has it: http://svn.collab.net/svn-doxygen/, and a rather complex one. There is an O'Reilly article on using it (http://www.linuxdevcenter.com/pub/a/linux/2003/04/24/libs...), but probably it's a way outdated by now.

Git rocks!

Posted Dec 22, 2005 16:44 UTC (Thu) by iabervon (subscriber, #722) [Link] (1 responses)

One of the post-1.0 things for git is a C API. Someone's already started on it, but it was going to be too intrusive to do before 1.0, so it's on hold for the moment.

Git rocks!

Posted Dec 22, 2005 20:36 UTC (Thu) by evgeny (guest, #774) [Link]

Thanks, good to know. Any estimate when it's going to happen?


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds