Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the core concepts of git, github, fork & branch. How does git compare to SVN?

Tags:

I've been using Github for sometime now but I'm getting a bit confused about some key concepts behind Git.

My background with VCS started with Source Safe and then transitioned into SVN and TFS. I think I'm stuck in the old way of thinking of CVS system, like SVN and TFS.

What is considered server-side and client-side in Git. From what I've understood there isn't a clear distinction between them.

In a technical sense, what does a Fork mean. Is it a "type" of branch?

Wat does a branch mean in git? Is it the same as in SVN?

Also I've been looking for a good visualization of the core concepts of Git, but haven't found any one that works for me.

like image 313
swallentin Avatar asked Feb 09 '12 01:02

swallentin


People also ask

What are the main concepts of Git?

Git is a distributed version control system, as a contrast to for example subversion that is centralized. What this means is that with subversion, the code repository (repo) lives on a server and people need special permissions (commit rights) to be able to add code to the repo. Everything lives in one place.

What is a GitHub fork?

A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the original repository. You can fetch updates from or submit changes to the original repository with pull requests.

What is the concept of GitHub?

GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. This tutorial teaches you GitHub essentials like repositories, branches, commits, and pull requests.


1 Answers

Here's how to understand Git:

  1. Forget everything you know about other VCSs (temporarily!)
  2. Read The Git Parable. Really read it though, if you skim, you'll miss stuff and just try to fill in the gaps with your existing SCM knowledge, which is what's throwing you off. In fact, if you really want to understand, read that blog post aloud.

At its core, Git is just a way to save and restore snapshots. Each snapshot has an "ID" (the SHA1), and may have one or more "refs" (pointers) to it. A branch? Just a friendlier name for a particular snapshot. Tags? Same thing. HEAD? That's just a "pronoun" for the current snapshot. Conveniently, these snapshots each come with a description of what changed - this description is the commit message.

like image 94
Ana Betts Avatar answered Sep 17 '22 13:09

Ana Betts