Avilay Parekh
CTO, Co-Founder of Informion, Inc.
January 2014
Learn about git’s three-tree architecture
Become familiar with terms like repo, staged
index, working directory, and HEAD....
Kevin Skoglund’s excellent git tutorial on
Lynda.com
Pro Git Book
(http://www.amazon.com/Pro-Experts-Voice-Software-
Devel...
Git has three “versions” of source files, all on
your local computer. They are referred to as –
repo, staging index, worki...
Your project directory structure is a “tree”
Git maintains 3 versions of your project on your local
computer – repo, stagi...
Git clone copies source from
a remote git server like
bitbucket or github over to
local computer
At this point, all three ...
All changes you make are in
your working directory.
staging index working
directory
repo
Change some files in
project
Changes are copied onto
the staging index tree.
staging index working
directory
repo
$ git add .
Changes are copied to the
repo. All three trees are alike
again.
Working directory is now
clean.
staging index working
dir...
Repo is the only tree that
maintains a commit history
in the form of a linked list like
structure
Each commit is identifie...
Git push will copy the
contents of the local repo to
the remote git server
If there are any uncommitted
changes they will ...
Upcoming SlideShare
Loading in...5
×

Git primer

156

Published on

A short primer on git basics like git-add, git-commit, and git-push

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
156
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Git primer

  1. 1. Avilay Parekh CTO, Co-Founder of Informion, Inc. January 2014
  2. 2. Learn about git’s three-tree architecture Become familiar with terms like repo, staged index, working directory, and HEAD. Get familiar with basic git commands – git add, git commit, git push
  3. 3. Kevin Skoglund’s excellent git tutorial on Lynda.com Pro Git Book (http://www.amazon.com/Pro-Experts-Voice-Software- Development/dp/1430218339/)
  4. 4. Git has three “versions” of source files, all on your local computer. They are referred to as – repo, staging index, working directory
  5. 5. Your project directory structure is a “tree” Git maintains 3 versions of your project on your local computer – repo, staging index, working directory There aren’t actually 3 physical directory structures Conceptual sections that are stored in the .git directory of your project
  6. 6. Git clone copies source from a remote git server like bitbucket or github over to local computer At this point, all three trees on the local computer look exactly alike staging working repo $ git clone https://path/to/git github
  7. 7. All changes you make are in your working directory. staging index working directory repo Change some files in project
  8. 8. Changes are copied onto the staging index tree. staging index working directory repo $ git add .
  9. 9. Changes are copied to the repo. All three trees are alike again. Working directory is now clean. staging index working directory repo $ git commit
  10. 10. Repo is the only tree that maintains a commit history in the form of a linked list like structure Each commit is identified by a GUID Each commit points to the one before it, its parent The last commit is also referenced as HEAD repo fff999 5d6ef1 HEAD
  11. 11. Git push will copy the contents of the local repo to the remote git server If there are any uncommitted changes they will not be copied over staging working repo $ git push github
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×