• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Intro to Git and GitHub
 

Intro to Git and GitHub

on

  • 2,881 views

Preso about Git and Github at DrupalCamp Athens 2010

Preso about Git and Github at DrupalCamp Athens 2010

Statistics

Views

Total Views
2,881
Views on SlideShare
2,856
Embed Views
25

Actions

Likes
1
Downloads
26
Comments
2

16 Embeds 25

http://www.linkedin.com 6
http://coderwall.com 3
http://users.sch.gr 2
http://www.onlydoo.com 2
http://www.exicon.mobi 1
http://paper.li 1
http://twitter.com 1
http://www.web2asia.com 1
http://scottgavin.info 1
http://www.hijodelmedio.com 1
http://kse7kal10.blogspot.com 1
http://www.petrobras.com.br 1
http://www.cs.nott.ac.uk 1
http://www.slideshare.net 1
http://comunidaddelossiervosdejesus.blogspot.com 1
http://www.govloop.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

12 of 2 previous next

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Intro to Git and GitHub Intro to Git and GitHub Presentation Transcript

    • DrupalCamp, Athens, 12 December 2010 An intro to Git and GitHubDrupal will be soon hosted at GiHub but before that learn Git for your own good and sanity Panagiotis Papadopoulos 6pna / Sfalma @panosjee
    • Who am I?Freelancer and startuper wannabe. Athens Ruby and GTUG organiser.Not a guru in something. Man of all trades master to none with an inclination towards Ruby,Python, Javascript.Do not ask me Drupal, but I will help drupalists with www.sfalma.com (shameless promo)
    • Subversion is the most pointless project ever started Linus Torvalds
    • What is Git?Git is a distributed revision control system with an emphasis on speed. Gitwas initially designed and developed by Linus Torvalds for Linuxkernel development.Every Git working directory is a full-fledged repository with complete historyand full revision tracking capabilities, not dependent on network access or acentral server.Gits current software maintenance is overseen by Junio Hamano. Git is freesoftware distributed under the terms of the GNU General PublicLicense version 2.If Git is a heavenly tool, GitHub is a programmer s heaven. - PanosJee, December 12th 2010 Source: http://en.wikipedia.org/wiki/Git_(software)
    • Git is distributedpanosjee jonromero savvas doxaras
    • Git is a very simple beast!Git is: Distributed Non linear development Efficient very small footprint Consists of Git objects which are the actual data of Git, the main thing that the repository is made up of. The four main objects of Git are blobs, trees, commits and tags. A Git object is a file in the repository compressed (with Zlib) and referenced by the SHA-1 value of its contents plus a small header. The contents of a file are stored as blobs.
    • The Git model (1)A simple repo withthe following Commandsstructure: $ git init . $ git add . $ git commit -m "first commit"- module - init.php -- includes - definitions.php -- lib - model.php Example from the excellent http://peepcode.com/products/git-internals-pdf
    • The Git model (2)A simple repo withthe following Commandsstructure: $ git tag "first tag" $ mkdir validators $ touch email.php $ git add .- module $ git commit -m "added validators" - init.php -- includes - definitions.php -- lib - model.php -- validators - email.php Example from the excellent http://peepcode.com/products/git-internals-pdf
    • The Git model (3) A simple repo with the following structure: - module - init.php -- includes - definitions.php -- lib - model.php * -- validators - email.phpCommands$ vim model.php$ git add .$ git commit -m "include validators" Example from the excellent http://peepcode.com/products/git-internals-pdf
    • The Git model (4)A simple repo withthe followingstructure:- module - init.php -- includes - definitions.php -- lib - model.php -- validators - email.php Example from the excellent http://peepcode.com/products/git-internals-pdf
    • Git is snapshot based Multiple parents 1 2 $ git commit -m "new commit" Easy branching 1 2 3 $ git commit -m "new commit" $ git branch 4 4
    • Git is snapshot based masterEasy merging 2 1 1 2 3 5 $ git merge 4 4
    • The virtues of Git Fork, Clone, Pull, Remote
    • Git pull. Full control. Remote repos. Made for speed, full visibility in a few lines. You can pull from 1-n remote repos. As we said Git is distributed.
    • Know thy status What s untracked. What s modified. What s added. What s deleted. What s changed.
    • Git branches carry their historyOnce you clone a Git repo you have complete access to allprevious versions. For ever.
    • Git stashReal life scenario.You are working on your code and your colleagues just pusheda very important fix that you needed.You cannot pull changes if you have not commited your code,but you should not commit as you are still experimenting.What do you do ?Just put your changes aside (git stash) get your friends changes(git pull) and then apply your changes that you had pust aside(git stash apply).Neat?
    • Commit to Open Source in a breezeThe distributed nature of Git The procedure is simple:means you can work locally 1. Find an open source project 2. Fork iton code and push to a 3. Clone (download locally)remote repository when 4. Do your changesready. 5. Push to your remoteThis is perfect for teams and Wanna have your changesOpen Source projects. merged into initial repo? 1. Do a pull request 2. Hope the author accepts it
    • $ tools“The bad workman blames his tools” American Proverb“We shape our tools and afterwards our tools shape us.”Marshall McLuhanThe best tool you need is to learn the internals of Git you canunderstand how it works.The second best tool is the command line. Master it. You willnever look back.Git integrates with various IDEs like Eclipse, NetBeans.There are also great standalone Git apps.
    • Tower - Mac App - Still beta - Impressive
    • GitX for Mac - GitK for other platforms
    • GitWeb - Web UI - Shipped with Git
    • Giggle - Linux
    • GitHub is the Facebook of CodeGitHub is an unparallel tool I am always struck by thethat offers you unlimited wealth of project I find onpublic repos and private GitHub.repos on subscriptions plans. Lots of major open source projects are there for you toGithub is: use and study. 1. Collaboration tool Fork them, change them, 2. Code host contribute in no time. 3. Wiki 4. Issue tracker 5. Code review tool If you are a coder and you 6. Git UI have never used GitHub you 7. Social probably live in a parallel universe :P
    • GitHub Network Graph Viewer
    • Questions?You may also use Mercurial, Fossil, Bazaar but Mercurial and Git are the winners :P http://bit.ly/git-dcath