Your SlideShare is downloading. ×
Git primer
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Git primer

132
views

Published on

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

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
132
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Avilay Parekh CTO, Co-Founder of Informion, Inc. January 2014
  • 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. Kevin Skoglund’s excellent git tutorial on Lynda.com Pro Git Book (http://www.amazon.com/Pro-Experts-Voice-Software- Development/dp/1430218339/)
  • 4. Git has three “versions” of source files, all on your local computer. They are referred to as – repo, staging index, working directory
  • 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. 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. All changes you make are in your working directory. staging index working directory repo Change some files in project
  • 8. Changes are copied onto the staging index tree. staging index working directory repo $ git add .
  • 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. 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. 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