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  Branchin...
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 l...
Command Line
commit  add                            push         pull            fetch                                 etc...    git he...
svn checkout <url> <dir> git clone <url> <dir>              ... but wait, its better!             Full revision history   ...
svn update       git pull <remote> <branch>         ... but wait, its better!             Merge branchesEach developer has...
svn add                    git add --all            ... but wait, its better! Just kidding. Its pretty much the same.But a...
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 Gi...
refspec            ≈ SVN branch nameA refspec is the name of a branch or tag, or     the SHA-1 of a particular commit.   T...
commit         ≈ SVN revision/commitChanges to files are identified by a SHA-1                   hash.Can usually be refer...
Commit Log
git logcommit 4f94c3059851fedce2d92f19af98d67ec8c2be69Author: Thomas Gorissen <thomas@adzcentral.com>Date:   Wed Nov 2 09:...
git log --oneline4f94c30   Changed date interpretation to adapt server change501753c   Fixing creative click tracking test...
git log --grep=refactoring3b9c48e Preparations for Tree control refactoringd3f32f9 Code cleanup/ refactoringb7d58d0 Minor ...
git log --author=seb23aad1c Override the aggregated status with only the primary status.6a9f696 Fixed showing the platform...
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/
Git and git hub
Git and git hub
Git and git hub
Upcoming SlideShare
Loading in...5
×

Git and git hub

392

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
392
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Git and git hub

  1. 1. Git and GitHubLifting ourselves out of SVN Sebastiaan Deckers November 2011
  2. 2. Whats wrong with SVN? Git is just better.
  3. 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. 4. Git clients? Windows: TortoiseGitMac: Github.app, Tower ($59)
  5. 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. 6. Command Line
  7. 7. commit add push pull fetch etc... git help <command>Your friendly neighbourhood documentation.
  8. 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. 9. svn update git pull <remote> <branch> ... but wait, its better! Merge branchesEach developer has their own remoteHack together without affecting others
  10. 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. 11. svn commit git push <remote> <branch> ... but wait, its better!As with pull, you can push to anywhere.
  12. 12. What is this I dont even...
  13. 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. 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. 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. 16. Commit Log
  17. 17. 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
  18. 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. 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. 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. 21. Branching
  22. 22. git branchList, create, or delete branchesWarning: Does not switch branch! #wtfgit
  23. 23. git checkout [-b] <branchname>Creates a new branch and switches to it.
  24. 24. git merge <branchname>Merges branchname into the currentbranch.
  25. 25. Branching Example http://book.git-scm.com/3_basic_branching_and_merging.html
  26. 26. GitHub
  27. 27. Commit History Whos doing what
  28. 28. Pull RequestsCode review and collaboration
  29. 29. Crazy Stats
  30. 30. Questions? RTFM http://book.git-scm.com/http://help.github.com/
  1. A particular slide catching your eye?

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

×