background preloader

Introduction to git

Facebook Twitter

The intro to subversion (svn) in the parent to this pearltree is probably a better intro to change control then the intro to git videos here. I've put a copy of that parent pearltree here in this tree so it's easy to find it.

And when you're ready Linus Torvalds tech-talk explaining the reason he wrote git makes a pretty good case for git, even if he calls more than one person ugly and stupid in the course of his talk. His talk assumes you have some background knowledge, so I suggest you start with the intro to svn in the parent pearltree and then the intro to git videos here and finally Linus's tech talk. I also include here "The Git parable" which is text that might make you more comfortable with a sense of the inner workings of git. Don't pick svn as your version control tool of choice until you've made your way through Linus's talk. Git Basics. So, what is Git in a nutshell?

This is an important section to absorb, because if you understand what Git is and the fundamentals of how it works, then using Git effectively will probably be much easier for you. As you learn Git, try to clear your mind of the things you may know about other VCSs, such as Subversion and Perforce; doing so will help you avoid subtle confusion when using the tool. Git stores and thinks about information much differently than these other systems, even though the user interface is fairly similar; understanding those differences will help prevent you from becoming confused while using it.

Snapshots, Not Differences The major difference between Git and any other VCS (Subversion and friends included) is the way Git thinks about its data. Figure 1-4. Git doesn’t think of or store its data this way. Figure 1-5. This is an important distinction between Git and nearly all other VCSs. Nearly Every Operation Is Local Git Has Integrity Git Generally Only Adds Data. Tech Talk: Linus Torvalds on git (70 minutes) Git Basics 4: Content, not files (5.1 minutes) Git Basics 3: Get Going (4.5 minutes) Git Basics 2: Local Git (8.25 minutes)

Git Basics 1: What is version control? (6 minutes) The Git Parable. Git is a simple, but extremely powerful system. Most people try to teach Git by demonstrating a few dozen commands and then yelling “tadaaaaa.” I believe this method is flawed. Such a treatment may leave you with the ability to use Git to perform simple tasks, but the Git commands will still feel like magical incantations. Doing anything out of the ordinary will be terrifying. Until you understand the concepts upon which Git is built, you’ll feel like a stranger in a foreign land. The following parable will take you on a journey through the creation of a Git-like system from the ground up.

Understanding the concepts presented here will be the most valuable thing you can do to prepare yourself to harness the full power of Git. The Parable Imagine that you have a computer that has nothing on it but a text editor and a few file system commands. Snapshots Alfred is a friend of yours that works down at the mall as a photographer in one of those “Special Moments” photo boutiques. Branches Merges. Introduction to svn.