Posted Aug 6, 2008 21:14 UTC (Wed) by dpotapov (guest, #46495)
In reply to: Simplified porcelains? by epa
Parent article: Git Magic
epa wrote: "99% of people do not use branches in CVS or Subversion"
Of course, they don't, because it is so painful with CVS or Subversion that people go at great
length avoiding them wherever possible. But Git developers use branches not because they are
"cool features", but because their usage significantly simplifies and speeds up development.
And the speed at which Git develops is the best testament to that.
epa: "how the differences between your local directory (whether changes have been committed or
not) and some remote repository"
If you already fetch changes from that remote. Then you can run:
git diff remote-name/branch-name
epa: "With svn, you can commit something and know that it's definitely there on the server,
being backed up every night."
The difference is that with SVN, you CANNOT backup your work in progress, while Git allows you
to that easily. You can backup all your local repo on the server (or even on a few servers if
you are really paranoiac). You can do that automatically on every commit or follow whatever
backup policy you like. Git is fully distributed system and mirroring changes is not a problem
at all!
epa: "You can say 'svn status' for reassurance that you don't have any changes which are not
in a safe place."
And that is how the central CVS and SVN repositories slowly but surely are turning in mess...
Just let any developer to commit without review and proper testing, just because they feel
that they need to save their work at the end of their day, and you are going to have a lot of
mess soon.
BTW, in respectable companies like Google, there is such a thing as code review, which means
that you can wait sometimes for days (happens even for weeks!) before you can check-in...
Even without code review, the full cycle of testing and building on different platforms and
different configurations may take hours. Are you going to wait at the end of your working day
when these tests have finished?
With Git, you are going home knowing that your changes are properly backed and in testing now,
and if results are okay (and you do not have to wait for someone's else approval), you can
push changes to the official repo. (In some workflows, most developers never push to the
official repo. So just send an email to the team lead saying that you have accomplished the
task, and then the team lead will either pull those changes or get back to you saying what
s/he does not like about your changes.)