coolharsh55 / kwest

Automatically exported from code.google.com/p/kwest
0 stars 0 forks source link

Using GIT for source control #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Briefly:
Automatic backups: If you accidentally delete some file (or part of a file) you 
can undelete it. If you change something and want to undo it, the VCS can do so.

Sharing on multiple computers: VCSes are designed to help multiple people 
collaboratively edit text files. This makes sharing between multiple computers 
(say your desktop and laptop) particularly easy. You do not need to bother if 
you always copied the newest version; the VCS will do that for you. Even if you 
are offline and change files on both computers, the VCS will merge the changes 
intelligently once you are online.

"Why Git is Better than X" outlines the various pros and cons of Git vs other 
SCMs.

Git tracks content rather than files
Branches are lightweight and merging is easy, and I mean really easy.
It's distributed, basically every repository is a branch. It's much easier to 
develop concurrently and collaboratively than with Subversion, in my opinion. 
It also makes offline development possible.

It doesn't impose any workflow, as seen on the above linked website, there are 
many workflows possible with Git. A Subversion-style workflow is easily 
mimicked.

Git repositories are much smaller in file size than Subversion repositories. 
There's only one ".git" directory, as opposed to dozens of ".svn" repositories 
(note Subversion 1.7 and higher now uses a single directory like Git.)

The staging area is awesome, it allows you to see the changes you will commit, 
commit partial changes and do various other stuff.
Stashing is invaluable when you do "chaotic" development, or simply want to fix 
a bug while you're still working on something else (on a different branch).

You can rewrite history, which is great for preparing patch sets and fixing 
your mistakes (before you publish the commits)
… and a lot more.

There are some disadvantages:

There aren't many good GUIs for it yet. It's new and Subversion has been around 
for a lot longer, so this is natural as there are a few interfaces in 
development. Some good ones include TortoiseGit and GitHub for Mac.
Partial checkouts/clones of repositories are not possible at the moment (I read 
that it's in development). However, there is submodule support. Git 1.7+ 
supports sparse checkouts.

It might be harder to learn, even though I did not find this to be the case 
(about a year ago). Git has recently improved its interface and is quite user 
friendly.

Original issue reported on code.google.com by coolharsh55 on 4 Dec 2012 at 5:23

GoogleCodeExporter commented 9 years ago
linked from 
[http://stackoverflow.com/questions/871/why-is-git-better-than-subversion]

Original comment by coolharsh55 on 4 Dec 2012 at 5:23

GoogleCodeExporter commented 9 years ago

Original comment by coolharsh55 on 5 Dec 2012 at 4:15