How to Git Manage Distributed Sources?

I am a Git newbie using UNIX SCCS and Microsoft Visual SourceSafe. I am just learning Git and it seems to have a huge and painful learning curve. Ive already seen git blow away all the data files that I did not, as for me. (How can a utility delete data files without warning, outside of me).

Linus Torvalds, in his video on Git, claims that Git is distributed, advertises the benefits of distribution, but apart from everyone who has a copy (clone) of the source, it really does not explain how distribution works.

How does git help distribution? How does Git help recover lost files? How does the Git distribution work? Can I find where the files were distributed? Is there a Git distribution tutorial?

Thanks in advance!

+7
git version-control distributed
source share
4 answers

Read this: http://www.newartisans.com/2008/04/git-from-the-bottom-up.html


Regarding other issues:

How does git work?

This is not a question suitable enough for an answer. But usually Git works by creating objects and putting them in a tree. Objects correspond to the changes you make to your content. Trees are the objects themselves. What Git tracks are changes made to the content in the repository.

How does distribution work?

Since all repositories can be servers, different repositories can compare their trees and objects and determine what changes are between the current state of this repository and another. This way they can click / drag from other repositories.

How does this help?

If you don’t see how this can help you, stick with MVSS.


I think there might be a problem with vocabulary. Distribution does not apply. Git Distribution means that every repository is a server. This does not mean that it will keep track of where it was cloned (although your own repository can store a list of remote repositories from which you can click / click).

Read the PDF I linked to. Then create the github repository following their directions. Fork someone else's repository, anyone, just to see how it works.

+3
source share

Git and Mercurial both adhere to very similar models when dealing with the distributed nature of SCM. I cannot speak with good tutorials, but there are some great works on Mercurial.

Understanding Mercurial - This one has good information about the exact question you are asking ... what does it mean to spread it

Mercurial Book - For more in-depth research.

+1
source share

Git and other DVCS basically β€œbring” the entire repository to the user. When I have a working copy of git, I also have the entire repository locally on my hard drive. No one else has access to it, but I can share it with the various tools and methods provided by the git system.

Other systems, such as SVN (which Linus mentions in the video), have the entire repository on the same server. Everyone pushes and pulls from this server.

Again, looking at git, my commits are isolated from my computer. When I'm ready for others to have them, I then β€œpublish” my add-ons in some way β€” perhaps on a central server such as SVN, but this is only one option. I could write you my changes.

Data loss prevention

One of the prospects for preventing data loss is that if I have a copy of the entire repository, and you have a copy of the whole repository, if any of us lose our hard drive, we can re-clone the repository. Of course, this assumes that we exchange our progress and strive to achieve a common goal.

Compare this to SVN (or other central repositories), if you lose your server hard drive, you need to restore the repo from the last backup if you have a backup. This means that someone must manage the server and provide backup, etc. DVCS, in some ways, does this in its essence.

Of course, there is also β€œdata loss” from errors such as accidental deletion of files, but this applies to all VCS.

+1
source share

You probably switched to another branch. Run git branch to find out which branches you have, and then git co <branchname> .

Personally, I really hate git. Large learning curve and wierd command line interface. But now it's a choice. So enjoy it! Oh yes, don't learn VSS, if you have one too, you'll learn REALLY REALLY Bad habits. VSS is all that should not be with source control.

-2
source share

All Articles