Your SlideShare is downloading. ×
Git and git hub
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 and git hub


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Git and GitHubLifting ourselves out of SVN Sebastiaan Deckers November 2011
  • 2. Whats wrong with SVN? Git is just better.
  • 3. 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
  • 4. Git clients? Windows: TortoiseGitMac:, Tower ($59)
  • 5. 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.
  • 6. Command Line
  • 7. commit add push pull fetch etc... git help <command>Your friendly neighbourhood documentation.
  • 8. svn checkout <url> <dir> git clone <url> <dir> ... but wait, its better! Full revision history No single point of failure Fast transfer speed
  • 9. svn update git pull <remote> <branch> ... but wait, its better! Merge branchesEach developer has their own remoteHack together without affecting others
  • 10. 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.
  • 11. svn commit git push <remote> <branch> ... but wait, its better!As with pull, you can push to anywhere.
  • 12. What is this I dont even...
  • 13. 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.
  • 14. 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.
  • 15. 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.
  • 16. Commit Log
  • 17. git logcommit 4f94c3059851fedce2d92f19af98d67ec8c2be69Author: Thomas Gorissen <>Date: Wed Nov 2 09:23:41 2011 +0000Changed date interpretation to adapt server changegit-svn-id:
  • 18. 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
  • 19. 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
  • 20. 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 :)
  • 21. Branching
  • 22. git branchList, create, or delete branchesWarning: Does not switch branch! #wtfgit
  • 23. git checkout [-b] <branchname>Creates a new branch and switches to it.
  • 24. git merge <branchname>Merges branchname into the currentbranch.
  • 25. Branching Example
  • 26. GitHub
  • 27. Commit History Whos doing what
  • 28. Pull RequestsCode review and collaboration
  • 29. Crazy Stats
  • 30. Questions? RTFM