SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Open Source Collaboration
   with Git and GitHub
      by Benjamin Young
     adapted from work by
        Nick Quaranto
whoami
• President of BigBlueHat
  – a web manufacturing company
  – we build web stuff
• We built BlueInk
   – a content management system
• Building sites since the late 90's
   – I remember Netscape 3
Ve rs io n Co ntro l
c o uld s a v e y o ur
        life .
Or a t le a s t y o ur
jo b/pro je c t/ide a /
    s a nity /g pa
The Basics
• Keep “backup” copies of files whenever
  you want
• Restore those copies quickly and easily
• Share the files and the change s with other
  developers
• Integrate their changes into your files
Directed Acyclic Graph
Git Internals: Blobs


                                                    main.c


457aef 93f f 7f f bb289f 7e1384f 900679eac f 044a
Git Internals: Trees
Git Internals: Commits
Git Internals: Commits
Giting Started
•   mkdir new_proj       •   cd old_proj
•   cd new_proj          •   git init
•   git init             •   git add .
•   ...do some work...   •   git commit
•   git add .
•   git commit
The Staging Area
What's changed?
git status
On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working
directory)
#
#   modified:      index.php
#
What's changed? (cont)
git diff
diff --git a/index.php b/index.php
index 9e7353c..1764d3e 100644
--- a/index.php
+++ b/index.php
@@ -24,4 +24,5 @@
 require_once 'webroot'.DIRECTORY_SEPARATOR.'index.php';
-?>
 No newline at end of file
+echo 'an example change';
+?>
Birds Eye View
• git log
• gitk
  – a graphical view of your repository
• GitX
  – Mac OS X app for doing the above
  – also handy for commit review
  – prettier than gitk
Git Internals: Branches



branchna
   me



 HEAD
Branching
Branching
• Another great reason to use Version
  Control—particularly git
• “Your first idea is never your best idea”
• Branches give you the freedom to change
  things...whenever
Branching (cont)
• git branch experimental
  – creates a branch named 'experimental'
• git branch
  – shows a list of branches:
• git checkout experimental
  – switch to the new branch
The Staging Area (cont)
• All that happened in the same directory
  – sort of...
• Your version histories actually in the .git
  folder
• so, when you checkout a branch git
  changes all the files outside of .git to
  match that branches content
• git it?
Put it back together again
• git checkout master
• git merge experimental

• if all went well, then your done
• if not:

• git mergetool
• git commit -a
Git Internals: Remotes



branchna
   me
           remotes/server/na
                 me
 HEAD
Local vs. Remote
Multiple Workflows
Centralized
Integration Manager
Benevolent Dictator
Where to Share
=
Other Hosting Options
• Public Only        • Public and Private
  – repo.or.cz         – GitHub.com
  – Gitorious.org      – CodaSet.com
• Private Only
  – Unfuddle.com
  – codebasehq.com
How to Contribute
1.   Fork a repository at GitHub
2.   Clone and connect your local repository
3.   Write tests, implement functionality
4.   Commit your local changes
5.   Push your changes to your fork
6.   Make a pull request
7.   Profit!!
git log
• Kudos to Sc o tt Cha c o n who made
   – http://git-scm.com
   – http://whygitisbetterthanx.com
• And to Mic ha e l Ha rtl
   – for Building the Insoshi Social Network
• Wikipedia too.

nick@quaran.to                 byoung@bigbluehat.com
http://litanyagainstfear.com   http://bigbluehat.com

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubGDSCIIITBbsr
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Simplilearn
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewRueful Robin
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHubUri Goldstein
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash courseMireia Sangalo
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administrationShawn Doyle
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Omar Fathy
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHuberr
 

Was ist angesagt? (20)

Github
GithubGithub
Github
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHub
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overviewGit and GitHub | Concept about Git and GitHub Process | Git Process overview
Git and GitHub | Concept about Git and GitHub Process | Git Process overview
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Git 101
Git 101Git 101
Git 101
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Git n git hub
Git n git hubGit n git hub
Git n git hub
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash course
 
GitHub
GitHubGitHub
GitHub
 
git and github
git and githubgit and github
git and github
 
Introduction to git administration
Introduction to git administrationIntroduction to git administration
Introduction to git administration
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2Introduction to Git and GitHub Part 2
Introduction to Git and GitHub Part 2
 
Introduction To Git
Introduction To GitIntroduction To Git
Introduction To Git
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
Git basic
Git basicGit basic
Git basic
 

Ähnlich wie The Basics of Open Source Collaboration With Git and GitHub

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...WSO2
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitRobert Lee-Cann
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notesglen_a_smith
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network EngineersJoel W. King
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubKim Moir
 
11 git version control
11 git version control11 git version control
11 git version controlWasim Alatrash
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .HELLOWorld889594
 
Git Introductive
Git IntroductiveGit Introductive
Git IntroductiveAdham Saad
 

Ähnlich wie The Basics of Open Source Collaboration With Git and GitHub (20)

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...Git workshop - University of Moratuwa, Department of Computer Science and Eng...
Git workshop - University of Moratuwa, Department of Computer Science and Eng...
 
Beginner's Guide to Version Control with Git
Beginner's Guide to Version Control with GitBeginner's Guide to Version Control with Git
Beginner's Guide to Version Control with Git
 
Git One Day Training Notes
Git One Day Training NotesGit One Day Training Notes
Git One Day Training Notes
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Let's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHubLet's Git this Party Started: An Introduction to Git and GitHub
Let's Git this Party Started: An Introduction to Git and GitHub
 
11 git version control
11 git version control11 git version control
11 git version control
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Git is a distributed version control system .
Git is a distributed version control system .Git is a distributed version control system .
Git is a distributed version control system .
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
Git tips and tricks
Git   tips and tricksGit   tips and tricks
Git tips and tricks
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git Introductive
Git IntroductiveGit Introductive
Git Introductive
 

Kürzlich hochgeladen

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

The Basics of Open Source Collaboration With Git and GitHub

  • 1. Open Source Collaboration with Git and GitHub by Benjamin Young adapted from work by Nick Quaranto
  • 2. whoami • President of BigBlueHat – a web manufacturing company – we build web stuff • We built BlueInk – a content management system • Building sites since the late 90's – I remember Netscape 3
  • 3. Ve rs io n Co ntro l c o uld s a v e y o ur life .
  • 4. Or a t le a s t y o ur jo b/pro je c t/ide a / s a nity /g pa
  • 5. The Basics • Keep “backup” copies of files whenever you want • Restore those copies quickly and easily • Share the files and the change s with other developers • Integrate their changes into your files
  • 6.
  • 7.
  • 9. Git Internals: Blobs main.c 457aef 93f f 7f f bb289f 7e1384f 900679eac f 044a
  • 13. Giting Started • mkdir new_proj • cd old_proj • cd new_proj • git init • git init • git add . • ...do some work... • git commit • git add . • git commit
  • 15. What's changed? git status On branch master # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: index.php #
  • 16. What's changed? (cont) git diff diff --git a/index.php b/index.php index 9e7353c..1764d3e 100644 --- a/index.php +++ b/index.php @@ -24,4 +24,5 @@ require_once 'webroot'.DIRECTORY_SEPARATOR.'index.php'; -?> No newline at end of file +echo 'an example change'; +?>
  • 17. Birds Eye View • git log • gitk – a graphical view of your repository • GitX – Mac OS X app for doing the above – also handy for commit review – prettier than gitk
  • 20. Branching • Another great reason to use Version Control—particularly git • “Your first idea is never your best idea” • Branches give you the freedom to change things...whenever
  • 21. Branching (cont) • git branch experimental – creates a branch named 'experimental' • git branch – shows a list of branches: • git checkout experimental – switch to the new branch
  • 22. The Staging Area (cont) • All that happened in the same directory – sort of... • Your version histories actually in the .git folder • so, when you checkout a branch git changes all the files outside of .git to match that branches content • git it?
  • 23. Put it back together again • git checkout master • git merge experimental • if all went well, then your done • if not: • git mergetool • git commit -a
  • 24. Git Internals: Remotes branchna me remotes/server/na me HEAD
  • 31.
  • 32. =
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38. Other Hosting Options • Public Only • Public and Private – repo.or.cz – GitHub.com – Gitorious.org – CodaSet.com • Private Only – Unfuddle.com – codebasehq.com
  • 39. How to Contribute 1. Fork a repository at GitHub 2. Clone and connect your local repository 3. Write tests, implement functionality 4. Commit your local changes 5. Push your changes to your fork 6. Make a pull request 7. Profit!!
  • 40. git log • Kudos to Sc o tt Cha c o n who made – http://git-scm.com – http://whygitisbetterthanx.com • And to Mic ha e l Ha rtl – for Building the Insoshi Social Network • Wikipedia too. nick@quaran.to byoung@bigbluehat.com http://litanyagainstfear.com http://bigbluehat.com