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

Git and GitHub

on

  • 8,112 views

This is a lengthy talk I gave to OK.rb in April covering many aspects of Git and GitHub.

This is a lengthy talk I gave to OK.rb in April covering many aspects of Git and GitHub.

Statistics

Views

Total Views
8,112
Views on SlideShare
7,392
Embed Views
720

Actions

Likes
26
Downloads
351
Comments
1

6 Embeds 720

http://techmaster.vn 637
http://blog.iband.kr 54
http://www.slideshare.net 23
http://www.techgig.com 3
http://devpub.kr 2
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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

11 of 1 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
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Git and GitHub Git and GitHub Presentation Transcript

  • Git and GitHub The unabridged story
  • BUT FIRST A WORD FROM OUR SPONSOR
  • BUT FIRST A WORD FROM OUR SPONSOR
  • BUT FIRST A WORD FROM OUR SPONSOR HAPPY BIRTHDAY DANA!
  • Git The stupid content tracker
  • What is Git, really?
  • Intelligence Check
  • Intelligence Check Subversion is a smart database of file differences
  • Intelligence Check Subversion is a smart database of file differences Unfortunately, this makes it quite complex
  • Intelligence Check Subversion is a smart database of file differences Unfortunately, this makes it quite complex Git is pretty stupid
  • Intelligence Check Subversion is a smart database of file differences Unfortunately, this makes it quite complex Git is pretty stupid Stores trees of content, much like a file system
  • Intelligence Check Subversion is a smart database of file differences Unfortunately, this makes it quite complex Git is pretty stupid Stores trees of content, much like a file system A commit creates a new tree reachable by name
  • Intelligence Check Subversion is a smart database of file differences Unfortunately, this makes it quite complex Git is pretty stupid Stores trees of content, much like a file system A commit creates a new tree reachable by name It can change your directory to recreate any tree
  • Git Isn’t Really an SCM
  • Git Isn’t Really an SCM Git does Source Code Management and
  • Git Isn’t Really an SCM Git does Source Code Management and Peer to peer content distribution
  • Git Isn’t Really an SCM Git does Source Code Management and Peer to peer content distribution Document database
  • Git Isn’t Really an SCM Git does Source Code Management and Peer to peer content distribution Document database Distributed wiki
  • Git Isn’t Really an SCM Git does Source Code Management and Peer to peer content distribution Document database Distributed wiki Distributed issue tracker
  • Git Isn’t Really an SCM Git does Source Code Management and Peer to peer content distribution Document database Distributed wiki Distributed issue tracker Backups
  • The Plusses of a Simple Design
  • The Plusses of a Simple Design It was designed to manage the development of the Linux kernel (a very large code base)
  • The Plusses of a Simple Design It was designed to manage the development of the Linux kernel (a very large code base) Git is very efficient
  • The Plusses of a Simple Design It was designed to manage the development of the Linux kernel (a very large code base) Git is very efficient Git handles non-linear development with grace
  • The Plusses of a Simple Design It was designed to manage the development of the Linux kernel (a very large code base) Git is very efficient Git handles non-linear development with grace Git is distributed from the ground up
  • SOMETIMES YOU HAVE A TOILET IN YOUR YARD
  • SOMETIMES YOU HAVE A TOILET IN YOUR YARD AND WHO WANTS THAT, REALLY?
  • The Minuses of the Toolkit Design
  • The Minuses of the Toolkit Design Git provides a ton of commands to interact with it
  • The Minuses of the Toolkit Design Git provides a ton of commands to interact with it The “porcelain” commands are the ones you typically interact with
  • The Minuses of the Toolkit Design Git provides a ton of commands to interact with it The “porcelain” commands are the ones you typically interact with The lower-level “plumbing” commands are crazy powerful, but less user friendly
  • The Minuses of the Toolkit Design Git provides a ton of commands to interact with it The “porcelain” commands are the ones you typically interact with The lower-level “plumbing” commands are crazy powerful, but less user friendly This can add up to make Git a little intimidating
  • Installing and Configuring
  • IF YOU BUILD IT, THEY WILL COME
  • IF YOU BUILD IT, THEY WILL COME
  • IF YOU BUILD IT, THEY WILL COME SOMETIMES YOU JUST HAVE TO INSTALL A RIDICULOUS ROBOT
  • OFFICIAL SITE: HTTP://GIT-SCM.COM/ THERE ARE BINARIES FOR SOME PLATFORMS
  • OFFICIAL SITE: HTTP://GIT-SCM.COM/ THERE ARE BINARIES FOR SOME PLATFORMS
  • OFFICIAL SITE: HTTP://GIT-SCM.COM/ THERE ARE BINARIES FOR SOME PLATFORMS
  • THE INSTRUCTIONS I USE TO BUILD ON MAC OS X THESE SIDESTEP THE DOCUMENTATION AND MACPORTS REQUIREMENTS
  • THE INSTRUCTIONS I USE TO BUILD ON MAC OS X THESE SIDESTEP THE DOCUMENTATION AND MACPORTS REQUIREMENTS
  • Git is still young and growing fast (update to 1.7)
  • [user] name = James Edward Gray II email = james@graysoftinc.com [apply] whitespace = nowarn [color] status = auto branch = auto interactive = auto repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [gc] auto = 1 [github] user = JEG2 token = … ~/.GITCONFIG THESE ARE SOME VERY HELPFUL GIT INTERFACE SETTINGS
  • [user] name = James Edward Gray II email = james@graysoftinc.com [apply] whitespace = nowarn [color] status = auto branch = auto interactive = auto repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [gc] auto = 1 [github] user = JEG2 token = … ~/.GITCONFIG THESE ARE SOME VERY HELPFUL GIT INTERFACE SETTINGS
  • [user] name = James Edward Gray II email = james@graysoftinc.com [apply] whitespace = nowarn [color] status = auto branch = auto interactive = auto repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [gc] auto = 1 [github] user = JEG2 token = … ~/.GITCONFIG THESE ARE SOME VERY HELPFUL GIT INTERFACE SETTINGS
  • [user] name = James Edward Gray II email = james@graysoftinc.com [apply] whitespace = nowarn [color] status = auto branch = auto interactive = auto repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [gc] auto = 1 [github] user = JEG2 token = … ~/.GITCONFIG THESE ARE SOME VERY HELPFUL GIT INTERFACE SETTINGS
  • set mainfont {Monaco 12} set textfont {Monaco 12} set uifont {"Monaco Bold" 12} set tabstop 8 set findmergefiles 0 set maxgraphpct 50 set maxwidth 16 set cmitmode patch set wrapcomment none set showneartags 1 set showlocalchanges 1 set datetimeformat {%Y-%m-%d %H:%M:%S} set limitdiffs 1 set bgcolor white set fgcolor black set colors {green red blue magenta darkgrey brown orange} set diffcolors {red "#00a000" blue} set diffcontext 3 set selectbgcolor gray85 set geometry(main) 794x484+5+45 set geometry(topwidth) 790 set geometry(topheight) 150 set geometry(pwsash0) "280 2" set geometry(pwsash1) "420 2" set geometry(botwidth) 350 set geometry(botheight) 314 set permviews {} ~/.GITK THESE SETTINGS CLEAN UP THE INCLUDED GUI
  • # Git alias g="git status" alias ga="git add" alias gaa="git add ." alias gc="git commit -m" alias gca="git commit -am" alias gb="git branch" alias gbd="git branch -d" alias gco="git checkout" alias gcob="git checkout -b" alias gm="git merge" alias gr="git rebase" alias gl="git log" alias gs="git show" alias gd="git diff" alias gbl="git blame" alias gps="git push" alias gpl="git pull" ~/.BASHRC THESE ARE SOME BASH ALIASES I USE
  • # Git alias g="git status" alias ga="git add" alias gaa="git add ." alias gc="git commit -m" alias gca="git commit -am" alias gb="git branch" alias gbd="git branch -d" alias gco="git checkout" alias gcob="git checkout -b" alias gm="git merge" alias gr="git rebase" alias gl="git log" alias gs="git show" alias gd="git diff" alias gbl="git blame" alias gps="git push" alias gpl="git pull" ~/.BASHRC THESE ARE SOME BASH ALIASES I USE
  • # Git alias g="git status" alias ga="git add" alias gaa="git add ." alias gc="git commit -m" alias gca="git commit -am" alias gb="git branch" alias gbd="git branch -d" alias gco="git checkout" alias gcob="git checkout -b" alias gm="git merge" alias gr="git rebase" alias gl="git log" alias gs="git show" alias gd="git diff" alias gbl="git blame" alias gps="git push" alias gpl="git pull" ~/.BASHRC THESE ARE SOME BASH ALIASES I USE
  • Memorize all of That?
  • Memorize all of That? There’s a new trend to store your “dotfiles” online
  • Memorize all of That? There’s a new trend to store your “dotfiles” online This makes it easy to move them
  • Memorize all of That? There’s a new trend to store your “dotfiles” online This makes it easy to move them Plus we can all share
  • Memorize all of That? There’s a new trend to store your “dotfiles” online This makes it easy to move them Plus we can all share Surprise: A great place to find these is GitHub
  • Memorize all of That? There’s a new trend to store your “dotfiles” online This makes it easy to move them Plus we can all share Surprise: A great place to find these is GitHub Mine are at: http://github.com/JEG2/dotfiles
  • Staging and Commits
  • DANA IS SAD
  • DANA IS SAD
  • DANA IS SAD HER CRAFT ROOM IS TRANSITIONING INTO A NURSERY
  • STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT STATUS GIT ADD . GIT STATUS GIT COMMIT -M “FIRST COMMIT.” STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT STATUS GIT ADD . GIT STATUS GIT COMMIT -M “FIRST COMMIT.” STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT STATUS GIT ADD . GIT STATUS GIT COMMIT -M “FIRST COMMIT.” STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT STATUS GIT ADD . GIT STATUS GIT COMMIT -M “FIRST COMMIT.” STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT STATUS GIT ADD . GIT STATUS GIT COMMIT -M “FIRST COMMIT.” STAGING A CHANGE, THEN COMMITTING THIS IS A NORMAL WORKFLOW FOR CHANGES IN GIT
  • GIT DATA IS SHARED BY THREE AREAS THE REPOSITORY HOLDS ALL POSSIBLE WORKING DIRECTORIES
  • THE WORKING DIRECTORY GIT DATA IS SHARED BY THREE AREAS THE REPOSITORY HOLDS ALL POSSIBLE WORKING DIRECTORIES
  • THE INDEX OR STAGING AREA GIT DATA IS SHARED BY THREE AREAS THE REPOSITORY HOLDS ALL POSSIBLE WORKING DIRECTORIES
  • THE REPOSITORY GIT DATA IS SHARED BY THREE AREAS THE REPOSITORY HOLDS ALL POSSIBLE WORKING DIRECTORIES
  • GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • GIT LOG GIT SHOW 96987 GIT SHOW 5F3F6 GIT BLAME README GIT INCLUDES POWERFUL INSPECTION TOOLS A SHA1 HASH (40 CHARACTERS) IS HOW GIT NAMES EVERYTHING
  • Branching and Merging
  • YOU CAN ADD BRANCHES TO ANYTHING
  • YOU CAN ADD BRANCHES TO ANYTHING
  • YOU CAN ADD BRANCHES TO ANYTHING A KID, YOUR SOURCE CODE, OR WHATEVER
  • Using Git without branches is like buying condoms and not having any sex
  • GIT WAS MADE TO BRANCH, LITERALLY! WHEN YOU BRANCH, GIT HAS TO WRITE 40 CHARACTERS TO A FILE (SUPER CHEAP)!
  • GIT WAS MADE TO BRANCH, LITERALLY! WHEN YOU BRANCH, GIT HAS TO WRITE 40 CHARACTERS TO A FILE (SUPER CHEAP)!
  • GIT WAS MADE TO BRANCH, LITERALLY! WHEN YOU BRANCH, GIT HAS TO WRITE 40 CHARACTERS TO A FILE (SUPER CHEAP)!
  • GIT WAS MADE TO BRANCH, LITERALLY! WHEN YOU BRANCH, GIT HAS TO WRITE 40 CHARACTERS TO A FILE (SUPER CHEAP)!
  • THE INCLUDED GITK SHOWS BRANCHES PASS THE --ALL FLAG TO SEE BRANCHES YOU AREN’T CURRENTLY ON
  • THE INCLUDED GITK SHOWS BRANCHES PASS THE --ALL FLAG TO SEE BRANCHES YOU AREN’T CURRENTLY ON
  • GIT MERGE PULLS THE NAMED BRANCH IN UNLIKE SUBVERSION, GIT MERGE IS POWERFUL, SMART, AND EASY TO USE
  • GIT MERGE PULLS THE NAMED BRANCH IN UNLIKE SUBVERSION, GIT MERGE IS POWERFUL, SMART, AND EASY TO USE
  • GIT MERGE PULLS THE NAMED BRANCH IN UNLIKE SUBVERSION, GIT MERGE IS POWERFUL, SMART, AND EASY TO USE
  • GIT MERGE PULLS THE NAMED BRANCH IN UNLIKE SUBVERSION, GIT MERGE IS POWERFUL, SMART, AND EASY TO USE
  • THE HISTORY SHOWS THE INCORPORATED BRANCH EVEN AFTER THE BRANCH IS DELETED, GIT REMEMBERS WHERE IT CAME FROM
  • THE HISTORY SHOWS THE INCORPORATED BRANCH EVEN AFTER THE BRANCH IS DELETED, GIT REMEMBERS WHERE IT CAME FROM
  • THE HISTORY SHOWS THE INCORPORATED BRANCH EVEN AFTER THE BRANCH IS DELETED, GIT REMEMBERS WHERE IT CAME FROM
  • THE HISTORY SHOWS THE INCORPORATED BRANCH EVEN AFTER THE BRANCH IS DELETED, GIT REMEMBERS WHERE IT CAME FROM
  • REBASE CAN BE USED TO FLATTEN THE HISTORY YOU CAN CHOOSE TO ADD A BRANCH ONTO THE END OF ANOTHER BRANCH
  • REBASE CAN BE USED TO FLATTEN THE HISTORY YOU CAN CHOOSE TO ADD A BRANCH ONTO THE END OF ANOTHER BRANCH
  • REBASE CAN BE USED TO FLATTEN THE HISTORY YOU CAN CHOOSE TO ADD A BRANCH ONTO THE END OF ANOTHER BRANCH
  • NOW THE MERGED HISTORY IS JUST A FLAT LINE GIT REPLAYED OUR CHANGES ONTO THE END OF THE MASTER BRANCH
  • With Git, it’s never too late to branch!
  • YOU CAN STILL BRANCH AFTER CHANGES IF A PROBLEM STARTS TO LOOK BIG AFTER WORKING ON IT, MOVE IT INTO A BRANCH
  • YOU CAN STILL BRANCH AFTER CHANGES IF A PROBLEM STARTS TO LOOK BIG AFTER WORKING ON IT, MOVE IT INTO A BRANCH
  • GIT STASH CAN HOLDS SOME CHANGES FOR LATER I USE THIS WHEN I GET INTERRUPTED AND NEED TO SWITCH GEARS
  • GIT STASH CAN HOLDS SOME CHANGES FOR LATER I USE THIS WHEN I GET INTERRUPTED AND NEED TO SWITCH GEARS
  • GIT STASH CAN HOLDS SOME CHANGES FOR LATER I USE THIS WHEN I GET INTERRUPTED AND NEED TO SWITCH GEARS
  • Editing History
  • DANA REVISED HER OWN HISTORY
  • DANA REVISED HER OWN HISTORY
  • DANA REVISED HER OWN HISTORY
  • DANA REVISED HER OWN HISTORY SHE THREW OUT ABOUT 60 COMMITS… ERR, POUNDS
  • Git Trusts you With the Scary Power Tools
  • Git Trusts you With the Scary Power Tools Several Git commands can be used to revise the commit history
  • Git Trusts you With the Scary Power Tools Several Git commands can be used to revise the commit history Total rewrites are possible
  • Git Trusts you With the Scary Power Tools Several Git commands can be used to revise the commit history Total rewrites are possible Some consider this very evil
  • Git Trusts you With the Scary Power Tools Several Git commands can be used to revise the commit history Total rewrites are possible Some consider this very evil Let me show you two lighter uses that I consider practical
  • YOU CAN AMEND (OR ADD TO) A COMMIT THIS IS AWESOME PERFECT FOR WHEN YOU FORGET TO ADD A FILE
  • YOU CAN AMEND (OR ADD TO) A COMMIT THIS IS AWESOME PERFECT FOR WHEN YOU FORGET TO ADD A FILE
  • YOU GET A CHANCE TO REVISE THE MESSAGE AS YOU CAN SEE, I HAVE TEXTMATE SET AS MY EDITOR
  • THE TWO COMMITS BECAME ONE NOTICE HOW ALL ASPECTS OF THE SECOND COMMIT WERE ROLLED INTO THE FIRST
  • THE TWO COMMITS BECAME ONE NOTICE HOW ALL ASPECTS OF THE SECOND COMMIT WERE ROLLED INTO THE FIRST
  • GIT CAN “CHERRY PICK” COMMITS YOU AREN’T REQUIRED TO TAKE COMMITS IN ORDER
  • GIT CAN “CHERRY PICK” COMMITS YOU AREN’T REQUIRED TO TAKE COMMITS IN ORDER
  • GIT CAN “CHERRY PICK” COMMITS YOU AREN’T REQUIRED TO TAKE COMMITS IN ORDER
  • Git Speaks Subversion
  • WHEELCHAIRS CAN RIDE JAPAN’S TRAINS
  • WHEELCHAIRS CAN RIDE JAPAN’S TRAINS
  • WHEELCHAIRS CAN RIDE JAPAN’S TRAINS BE SURE YOU SPEAK A LITTLE JAPANESE THOUGH, JUST IN CASE!
  • Git Ships With Subversion Support
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL Add --username=USER if needed
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL Add --username=USER if needed Update with: git svn rebase
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL Add --username=USER if needed Update with: git svn rebase Subversion requires a linear history, thus rebase
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL Add --username=USER if needed Update with: git svn rebase Subversion requires a linear history, thus rebase Use Git to develop locally as normal
  • Git Ships With Subversion Support Checkout with: git svn clone SUBVERSION_URL Add --username=USER if needed Update with: git svn rebase Subversion requires a linear history, thus rebase Use Git to develop locally as normal Commit all diffs to Subversion: git svn dcommit
  • Distributed Repositories
  • YOU CAN NEVER HAVE TOO FEW GEEKS
  • YOU CAN NEVER HAVE TOO FEW GEEKS
  • YOU CAN NEVER HAVE TOO FEW GEEKS I NEED THIS MANY JUST TO PLAY A GAME ONCE A YEAR
  • git clone git://192.168.0.109/faster_csv
  • To Set That Up…
  • To Set That Up… I created a git_server directory on my Desktop
  • To Set That Up… I created a git_server directory on my Desktop I moved my faster_csv repository into it
  • To Set That Up… I created a git_server directory on my Desktop I moved my faster_csv repository into it I ran: git daemon --base-path=/Users/james/ Desktop/git_server --export-all
  • To Set That Up… I created a git_server directory on my Desktop I moved my faster_csv repository into it I ran: git daemon --base-path=/Users/james/ Desktop/git_server --export-all This is read-only (but write support is possible) access on port 9418
  • To Set That Up… I created a git_server directory on my Desktop I moved my faster_csv repository into it I ran: git daemon --base-path=/Users/james/ Desktop/git_server --export-all This is read-only (but write support is possible) access on port 9418 This rocks for when GitHub is down
  • http://192.168.0.109:1234/
  • An Instant Web Interface
  • An Instant Web Interface I moved into the Git working directory
  • An Instant Web Interface I moved into the Git working directory I ran: git instaweb --httpd=webrick
  • An Instant Web Interface I moved into the Git working directory I ran: git instaweb --httpd=webrick Later, I will stop it with: git instaweb --stop
  • An Instant Web Interface I moved into the Git working directory I ran: git instaweb --httpd=webrick Later, I will stop it with: git instaweb --stop This is a handy poor man’s repository browser that’s pretty much always available
  • Git Strategies
  • EVERYBODY HAS THEIR SYSTEM
  • EVERYBODY HAS THEIR SYSTEM
  • EVERYBODY HAS THEIR SYSTEM
  • EVERYBODY HAS THEIR SYSTEM
  • EVERYBODY HAS THEIR SYSTEM
  • EVERYBODY HAS THEIR SYSTEM DANA HAS ONE JUST FOR FOOD
  • Git Supports Many Work Styles
  • Git Supports Many Work Styles Git’s features make it very flexible
  • Git Supports Many Work Styles Git’s features make it very flexible Non-linear history is fully supported
  • Git Supports Many Work Styles Git’s features make it very flexible Non-linear history is fully supported Powerful history rewriting is provided
  • Git Supports Many Work Styles Git’s features make it very flexible Non-linear history is fully supported Powerful history rewriting is provided All repositories are masters
  • Git Supports Many Work Styles Git’s features make it very flexible Non-linear history is fully supported Powerful history rewriting is provided All repositories are masters Any repository can be distributed
  • Git Supports Many Work Styles Git’s features make it very flexible Non-linear history is fully supported Powerful history rewriting is provided All repositories are masters Any repository can be distributed Many work strategies are built off of these features
  • Branch Strategies
  • SAY WE HAVE A BRANCH WITH TWO COMMITS THIS IS A PRETTY TYPICAL GIT SCENARIO, A TOPIC BRANCH OFF OF MASTER
  • FAST FORWARD (A FLAT MERGE) BY DEFAULT, GIT WOULD JUST ADD THESE COMMITS ONTO MASTER
  • YOU CAN FORCE GIT TO KEEP THE BRANCH HTTP://NVIE.COM/GIT-MODEL
  • YOU CAN FORCE GIT TO KEEP THE BRANCH HTTP://NVIE.COM/GIT-MODEL
  • NOTICE HOW GIT ADDED A MERGE COMMIT YOU CAN REVERT THAT ONE COMMIT TO UNDO THE ENTIRE BRANCH
  • NOTICE HOW GIT ADDED A MERGE COMMIT YOU CAN REVERT THAT ONE COMMIT TO UNDO THE ENTIRE BRANCH
  • ALTERNATELY, YOU COULD SQUASH THE COMMITS HTTP://GEEWAX.ORG/2009/11/21/AGILE-GIT-WORKFLOW.HTML
  • ALTERNATELY, YOU COULD SQUASH THE COMMITS HTTP://GEEWAX.ORG/2009/11/21/AGILE-GIT-WORKFLOW.HTML
  • REBASE ASKS ME HOW TO HANDLE EACH COMMIT GIT COMMANDS LIKE ADD AND REBASE SUPPORT A POWERFUL INTERACTIVE MODE
  • REBASE ASKS ME HOW TO HANDLE EACH COMMIT GIT COMMANDS LIKE ADD AND REBASE SUPPORT A POWERFUL INTERACTIVE MODE
  • YOU EVEN GET TO REVISE THE COMMITS COMBINE OR REPLACE THEM TO TASTE
  • YOU EVEN GET TO REVISE THE COMMITS COMBINE OR REPLACE THEM TO TASTE
  • FINALLY, MERGE THE COLLAPSED COMMIT I CAN USE THE POWER OF INTERACTIVE MODE TO COLLAPSE THINGS INTO ONE COMMIT
  • FINALLY, MERGE THE COLLAPSED COMMIT I CAN USE THE POWER OF INTERACTIVE MODE TO COLLAPSE THINGS INTO ONE COMMIT
  • A TOPIC BRANCH WAS REDUCED TO ONE COMMIT THIS IS ANOTHER TECHNIQUE THAT ALLOWS US TO UNDO IT WITH ONE REVERT
  • A TOPIC BRANCH WAS REDUCED TO ONE COMMIT THIS IS ANOTHER TECHNIQUE THAT ALLOWS US TO UNDO IT WITH ONE REVERT
  • Master Repository Strategies
  • YOUR SUBVERSION STRATEGY STILL WORKS FINE THIS IS HOW GITHUB IS COMMONLY USED
  • LINUS USES HIS “CIRCLE OF TRUST” HTTP://WWW.YOUTUBE.COM/WATCH?V=4XPNKHJAOK8
  • LINUS USES HIS “CIRCLE OF TRUST” HTTP://WWW.YOUTUBE.COM/WATCH?V=4XPNKHJAOK8
  • LINUS USES HIS “CIRCLE OF TRUST” HTTP://WWW.YOUTUBE.COM/WATCH?V=4XPNKHJAOK8
  • GitHub https://github.com/ Social coding with Git
  • GitHub is one of Git’s Killer Features
  • THIS IS CALLED “FORKING”
  • THIS IS CALLED “FORKING” DANA IS SPINNING OFF OF A COPY OF GENES WE WILL EDIT SEPARATELY
  • “Hardcore Forking Action”
  • CREATING A GITHUB REPOSITORY IS TRIVIAL PUBLIC, OPEN SOURCE REPOSITORIES ARE FREE!
  • CREATING A GITHUB REPOSITORY IS TRIVIAL PUBLIC, OPEN SOURCE REPOSITORIES ARE FREE!
  • A REPOSITORY ON GITHUB: THE RAILS SOURCE HERE YOU CAN BROWSE OR FORK THE CODE
  • A REPOSITORY ON GITHUB: THE RAILS SOURCE HERE YOU CAN BROWSE OR FORK THE CODE
  • A REPOSITORY ON GITHUB: THE RAILS SOURCE HERE YOU CAN BROWSE OR FORK THE CODE
  • A REPOSITORY ON GITHUB: THE RAILS SOURCE HERE YOU CAN BROWSE OR FORK THE CODE
  • A REPOSITORY ON GITHUB: THE RAILS SOURCE HERE YOU CAN BROWSE OR FORK THE CODE
  • A FORKED REPOSITORY: RIOT THIS FORK IS LINKED BACK TO THE ORIGINAL AND THEY CAN PULL FROM IT
  • A FORKED REPOSITORY: RIOT THIS FORK IS LINKED BACK TO THE ORIGINAL AND THEY CAN PULL FROM IT
  • A FORKED REPOSITORY: RIOT THIS FORK IS LINKED BACK TO THE ORIGINAL AND THEY CAN PULL FROM IT
  • A FORKED REPOSITORY: RIOT THIS FORK IS LINKED BACK TO THE ORIGINAL AND THEY CAN PULL FROM IT
  • A FORKED REPOSITORY: RIOT THIS FORK IS LINKED BACK TO THE ORIGINAL AND THEY CAN PULL FROM IT
  • THE NETWORK GRAPH THIS IS WHERE YOU CAN SEE HOW ALL OF THE FORKS RELATE
  • THE NETWORK GRAPH THIS IS WHERE YOU CAN SEE HOW ALL OF THE FORKS RELATE
  • THE NETWORK GRAPH THIS IS WHERE YOU CAN SEE HOW ALL OF THE FORKS RELATE
  • THE NETWORK GRAPH THIS IS WHERE YOU CAN SEE HOW ALL OF THE FORKS RELATE
  • THE FORK QUEUE CAN MERGE EXTERNAL CHANGES I PREFER TO HANDLE THIS REMOTES SO A CAN WORK WITH NORMAL BRANCHES
  • THE FORK QUEUE CAN MERGE EXTERNAL CHANGES I PREFER TO HANDLE THIS REMOTES SO A CAN WORK WITH NORMAL BRANCHES
  • THE FORK QUEUE CAN MERGE EXTERNAL CHANGES I PREFER TO HANDLE THIS REMOTES SO A CAN WORK WITH NORMAL BRANCHES
  • MY FORK AND THE OFFICIAL GIT’S REMOTES CAN MANAGE ANY NUMBER OF RELATED REPOSITORIES
  • MY FORK AND THE OFFICIAL GIT’S REMOTES CAN MANAGE ANY NUMBER OF RELATED REPOSITORIES
  • MY FORK AND THE OFFICIAL GIT’S REMOTES CAN MANAGE ANY NUMBER OF RELATED REPOSITORIES
  • MY FORK AND THE OFFICIAL GIT’S REMOTES CAN MANAGE ANY NUMBER OF RELATED REPOSITORIES
  • FETCHING A REMOTE GIT FETCH ALLOWS YOU TO ADD ALL DETAILS OF A REMOTE TO YOUR LOCAL COPY
  • FETCHING A REMOTE GIT FETCH ALLOWS YOU TO ADD ALL DETAILS OF A REMOTE TO YOUR LOCAL COPY
  • PLAY WITH CODE FROM A REMOTE LOCAL BRANCHES CAN TRACK REMOTE BRANCHES
  • PLAY WITH CODE FROM A REMOTE LOCAL BRANCHES CAN TRACK REMOTE BRANCHES
  • PLAY WITH CODE FROM A REMOTE LOCAL BRANCHES CAN TRACK REMOTE BRANCHES
  • FULLY SHARE WITH COLLABORATORS A COLLABORATOR CAN USE THE CODE LIKE YOU WITHOUT PULL REQUESTS
  • FULLY SHARE WITH COLLABORATORS A COLLABORATOR CAN USE THE CODE LIKE YOU WITHOUT PULL REQUESTS
  • FULLY SHARE WITH COLLABORATORS A COLLABORATOR CAN USE THE CODE LIKE YOU WITHOUT PULL REQUESTS
  • Gists
  • OUR NEIGHBOR’S YARD
  • OUR NEIGHBOR’S YARD SOME THINGS ARE TOO GOOD NOT TO SHARE
  • A GIT-CENTRIC CODE PASTING SERVICE PASTE ONE OR MORE FILES TAGGED WITH A LANGUAGE
  • A GIT-CENTRIC CODE PASTING SERVICE PASTE ONE OR MORE FILES TAGGED WITH A LANGUAGE
  • A GIT-CENTRIC CODE PASTING SERVICE PASTE ONE OR MORE FILES TAGGED WITH A LANGUAGE
  • A GIT-CENTRIC CODE PASTING SERVICE PASTE ONE OR MORE FILES TAGGED WITH A LANGUAGE
  • IT’S A PASTE AND A GIT REPOSITORY YOU CAN FORK THIS CODE OR CLONE IT TO WORK WITH LOCALLY
  • IT’S A PASTE AND A GIT REPOSITORY YOU CAN FORK THIS CODE OR CLONE IT TO WORK WITH LOCALLY
  • Hooks
  • IT’S ALWAYS GOOD TO HAVE TRAINED HELP
  • IT’S ALWAYS GOOD TO HAVE TRAINED HELP
  • IT’S ALWAYS GOOD TO HAVE TRAINED HELP YOU CAN TEACH GIT AND GITHUB NEW TRICKS
  • GIT HOOKS THE POST-COMMIT HOOK CAN BE USED TO AUTO TAG RELEASES
  • GIT HOOKS THE POST-COMMIT HOOK CAN BE USED TO AUTO TAG RELEASES
  • GIT HOOKS THE POST-COMMIT HOOK CAN BE USED TO AUTO TAG RELEASES
  • GITHUB SUPPORTS HOOKS POST TO A URL, SEND AN EMAIL, OR MORE WHEN GITHUB IS PUSHED TO
  • GITHUB SUPPORTS HOOKS POST TO A URL, SEND AN EMAIL, OR MORE WHEN GITHUB IS PUSHED TO
  • GITHUB SUPPORTS HOOKS POST TO A URL, SEND AN EMAIL, OR MORE WHEN GITHUB IS PUSHED TO
  • GITHUB SUPPORTS HOOKS POST TO A URL, SEND AN EMAIL, OR MORE WHEN GITHUB IS PUSHED TO
  • README Formatting
  • FIRST IMPRESSIONS MATTER
  • FIRST IMPRESSIONS MATTER
  • FIRST IMPRESSIONS MATTER
  • FIRST IMPRESSIONS MATTER YOU HAVE TO ADVERTISE WHAT’S INSIDE
  • GITHUB IS SMART ABOUT README FORMATS IT WILL SHOW README FILES IN EACH FOLDER AND HTMLIFY SOME CONTENT TYPES
  • GITHUB IS SMART ABOUT README FORMATS IT WILL SHOW README FILES IN EACH FOLDER AND HTMLIFY SOME CONTENT TYPES
  • GITHUB IS SMART ABOUT README FORMATS IT WILL SHOW README FILES IN EACH FOLDER AND HTMLIFY SOME CONTENT TYPES
  • Supported Formats
  • Supported Formats RDoc (.rdoc)
  • Supported Formats RDoc (.rdoc) Reuse your Ruby project documentation
  • Supported Formats RDoc (.rdoc) Reuse your Ruby project documentation Markdown (.markdown, .md, .mdown, …)
  • Supported Formats RDoc (.rdoc) Reuse your Ruby project documentation Markdown (.markdown, .md, .mdown, …) A human-readable format for other projects
  • Supported Formats RDoc (.rdoc) Reuse your Ruby project documentation Markdown (.markdown, .md, .mdown, …) A human-readable format for other projects Also supported: Textile (.textile), PNG (.png), reStructuredText (.rst), and POD (.pod)
  • GitHub Pages
  • OUR NEW OK.RB WEBSITE: HTTP://OK-RUBY.ORG/
  • OUR NEW OK.RB WEBSITE: HTTP://OK-RUBY.ORG/
  • OUR NEW OK.RB WEBSITE: HTTP://OK-RUBY.ORG/ YOU CAN HELP MAKE THIS BETTER
  • IT’S A PROJECT ON GITHUB THE GITHUB PAGES FEATURE TURNS THIS INTO A REAL SITE
  • IT’S A PROJECT ON GITHUB THE GITHUB PAGES FEATURE TURNS THIS INTO A REAL SITE
  • GitHub Pages
  • GitHub Pages Name a repository after you: USER.github.com
  • GitHub Pages Name a repository after you: USER.github.com Or add a gh-pages branch to any repository
  • GitHub Pages Name a repository after you: USER.github.com Or add a gh-pages branch to any repository GitHub will build the site after each commit
  • GitHub Pages Name a repository after you: USER.github.com Or add a gh-pages branch to any repository GitHub will build the site after each commit Sites are Jekyll (a static site generator) processed
  • GitHub Pages Name a repository after you: USER.github.com Or add a gh-pages branch to any repository GitHub will build the site after each commit Sites are Jekyll (a static site generator) processed Used to build listings, syntax highlight, etc.
  • GitHub Pages Name a repository after you: USER.github.com Or add a gh-pages branch to any repository GitHub will build the site after each commit Sites are Jekyll (a static site generator) processed Used to build listings, syntax highlight, etc. You can point a real domain at them
  • Documentation Learning more about Git and GitHub
  • IF YOU FELL ASLEEP IN THIS TALK…
  • IF YOU FELL ASLEEP IN THIS TALK… YOU MAY NEED TO RTFM
  • Where to Find the Docs
  • Where to Find the Docs Git has awesome man(ual) pages
  • Where to Find the Docs Git has awesome man(ual) pages Replace spaces with dashes: man git-stash
  • Where to Find the Docs Git has awesome man(ual) pages Replace spaces with dashes: man git-stash Scott Chacon’s (GitHub’s Git Guru) Pro Git book
  • Where to Find the Docs Git has awesome man(ual) pages Replace spaces with dashes: man git-stash Scott Chacon’s (GitHub’s Git Guru) Pro Git book Free online: http://progit.org/
  • Where to Find the Docs Git has awesome man(ual) pages Replace spaces with dashes: man git-stash Scott Chacon’s (GitHub’s Git Guru) Pro Git book Free online: http://progit.org/ GitHub has good guides: http://help.github.com/
  • Where to Find the Docs Git has awesome man(ual) pages Replace spaces with dashes: man git-stash Scott Chacon’s (GitHub’s Git Guru) Pro Git book Free online: http://progit.org/ GitHub has good guides: http://help.github.com/ They cover GitHub and Git topics
  • You have passed this endurance test!