Git and git hub
Upcoming SlideShare
Loading in...5
×
 

Git and git hub

on

  • 499 views

 

Statistics

Views

Total Views
499
Slideshare-icon Views on SlideShare
494
Embed Views
5

Actions

Likes
0
Downloads
3
Comments
0

2 Embeds 5

http://www.linkedin.com 4
https://duckduckgo.com 1

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
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Git and git hub Git and git hub Presentation Transcript

    • Git and GitHubLifting ourselves out of SVN Sebastiaan Deckers November 2011
    • Whats wrong with SVN? Git is just better.
    • http:// Why Git Is Better Than X .com/Features Workflow● Cheap Local ● Subversion-Style Branching Workflow● Everything is Local ● Integration● Git is Fast Manager Workflow● Git is Small ● Dictator and● The Staging Area Lieutenants● Distributed Workflow● GitHub● Easy to Learn
    • Git clients? Windows: TortoiseGitMac: Github.app, Tower ($59)
    • WorkflowAdd source code files so that Git tracks them in the local repository.Commit your changed files to the local repo. Push to upload your commits to GitHub. Pull to get commits from GitHub.
    • Command Line
    • commit add push pull fetch etc... git help <command>Your friendly neighbourhood documentation.
    • svn checkout <url> <dir> git clone <url> <dir> ... but wait, its better! Full revision history No single point of failure Fast transfer speed
    • svn update git pull <remote> <branch> ... but wait, its better! Merge branchesEach developer has their own remoteHack together without affecting others
    • svn add git add --all ... but wait, its better! Just kidding. Its pretty much the same.But add also used to mark merge conflicts as resolved.
    • svn commit git push <remote> <branch> ... but wait, its better!As with pull, you can push to anywhere.
    • What is this I dont even...
    • remote ≈ SVN repository URL A remote is a bookmark of another Git repository. It represents a Git repo by its URL. The default remote is called "origin".The origin remote has no special meaning and is merely convention.
    • refspec ≈ SVN branch nameA refspec is the name of a branch or tag, or the SHA-1 of a particular commit. The default refspec is called "master".The master refspec has no special meaning and is merely convention.
    • commit ≈ SVN revision/commitChanges to files are identified by a SHA-1 hash.Can usually be referenced by the first few characters. Allows Git to do fast comparisions, error checking, compact storage.
    • Commit Log
    • git logcommit 4f94c3059851fedce2d92f19af98d67ec8c2be69Author: Thomas Gorissen <thomas@adzcentral.com>Date: Wed Nov 2 09:23:41 2011 +0000Changed date interpretation to adapt server changegit-svn-id: https://subversion.assembla.com/svn/adz/uinew@46723c9e7dd8-c376-4c09-bcd8-96044d63829d
    • git log --oneline4f94c30 Changed date interpretation to adapt server change501753c Fixing creative click tracking testcce1c63 Changing maximum bid to bid-price23aad1c Override the aggregated status with only the primary status.4b2f730 Increased version number to 1.5.584aed45 Show the filter ID when a name is missing5ae3f2f not overriding backup picture with old one on upload38af93b removing now unnecessary code to reference backupID7dac9c0 Redirecting user to #Home if he doesnt accept terms02afc23 Added ISO date parsingb30d440 Changed sessionTimeout to be understood as secondsa57adf0 Not querying for rejected creatives on select popup in CIbc4c93a Recursively apply the active selection on search results7ad1401 Highlighting error fields on credit limit change
    • git log --grep=refactoring3b9c48e Preparations for Tree control refactoringd3f32f9 Code cleanup/ refactoringb7d58d0 Minor code refactoring83a2235 Minor refactoring for improved trickeryba83e28 Massive refactoring of the filters control. Now supportsdisabling entire menu sections on-the-fly.98e9232 Lots of refactoring to show Pending Approvals as a widgetanywhere
    • git log --author=seb23aad1c Override the aggregated status with only the primary status.6a9f696 Fixed showing the platform support dagger symbol on searchresults84aed45 Show the filter ID when a name is missing78a9948 Asynchronous rendering with a loading indicator for audiencetemplate loading/savingbc4c93a Recursively apply the active selection on search resultsedb35be Fixed recursive selection to activate all parentscbe9542 Removed dead code :)
    • Branching
    • git branchList, create, or delete branchesWarning: Does not switch branch! #wtfgit
    • git checkout [-b] <branchname>Creates a new branch and switches to it.
    • git merge <branchname>Merges branchname into the currentbranch.
    • Branching Example http://book.git-scm.com/3_basic_branching_and_merging.html
    • GitHub
    • Commit History Whos doing what
    • Pull RequestsCode review and collaboration
    • Crazy Stats
    • Questions? RTFM http://book.git-scm.com/http://help.github.com/