SlideShare a Scribd company logo
1 of 54
Let’s Git this Party
      Started
 An introduction to Git and GitHub




                                     @Kim_Moir
Tonight’s agenda

• Introduction
• A short history of open source version
  control systems
• Why Git and GitHub
• Hands on exercises: Using Git, GitHub
• Git concepts
Introduction


• About you?
• About me
What is open source
Open source
communities
What is version control

• A system to manage changes to digital
  artifacts
• Examples: code, documentation, the
  possibilities are endless
Example: Book
 collaboration
History of Version
     Control
CVS and SVN
                  Server




John                             Paul



  Susan                    Kim
           Remy
2005: Git
"I'm an egotistical bastard, and I name all
my projects after myself. First Linux,
now git."

--Linus Torvalds
Source Control

• Centralized all use a central repository:
  CVS, Subversion, Perforce
• Distributed (DVCS) allow you to reconcile
  your local repository with a centralized
  one: Git, Mercurial
Git Design Goals

• Fast
• Distributed
• Each commit has a corresponding hash key
• Everyone has a local copy of the history
Development models

Lieutenant                    Lieutenant
             Canonical repo




             Committers
Another model
   Canonical repo




                    Committers
Git Usage
Installation steps

• Install git
• Setup ssh keys
• Create github account and add ssh key
• Setup your name and email in gitconfig
• git config --list
Check your installation
        first
• Is git installed? Yes, if this command runs
  git
• Is ssh installed and a key created? Yes, if this
  file exists
  ls ~/.ssh/id_rsa.pub
Installing Git

• Windows: http://help.github.com/win-set-
  up-git/
• Linux: http://help.github.com/linux-set-up-
  git/
• Mac: http://help.github.com/mac-set-up-git/
Create a local repository
   Change to your home directory
   cd ~/
   create a working directory
   mkdir my_repo
   cd my_repo
   ls -la to look at the directory
   git init
   ls -la
   Should see .git
   To check the status of your repo
   git status
Git-ting help

man <command> (print the online manual)
program help (git help)
<program> help command (git help init)
Add files to your repo
Create a file
touch hello_world.txt
Check repo status
git status
Git only tracks files we tell it to
Add the file to the repo
git add hello_world.txt
git status
File should now be tracked
Changes and commits
Open hello_world.txt and add some more text
git status
Stage the change
git add hello_world.txt
Commit the change
git commit -m “added text”
Create another file
touch newfile.txt
Add all untracked files in the current directory
git add .
Commit the change
git commit -m “added newfile”
Why do you need to
     add files?
• Git tracks your changes, not your files
• We are telling git to track the current state
  of the file when we add it
• Staging is adding the file to the repository
  to be tracked
• If you change a file, you also have to tell git
  to track the changed file
What have you done?
git log
git log | grep newfile
git log --pretty=oneline
gitk
Git archeology
add text to hello_world.txt
git add .
git commit -m “added text”
Find the commit hash
git log --pretty=oneline
checkout a previous commit
git checkout <hash>
cat hello_world.txt
To return to the current version
git checkout master
Tags are better for
        Humans
• The reality is that nobody types hashes to
  check out a commit
• One approach is to use tags
• Tags as a general practice are considered
  immutable
• Tags are often used to record a moment in
  time for administrative purposes
Tags
Tag your current repo as version_one
cat hello_world.txt
git tag version_one
checkout previous changeset
git checkout version_one^
cat hello_world.txt
tag the previous changeset as a RC
git tag rc
git checkout version_one
Use gitk and git tag to view tags
Undoing Local changes
Return to master branch
git checkout master
If you haven’t committed
change hello_world.txt
git checkout hello_world.txt
look at local copy of hello_world.txt
Version of file is overwritten with the one
from the repo
Undoing Commits (1)
If staged
change hello_world.txt
git add hello_world.txt
git reset HEAD hello_world.txt
This will unstage the change
git checkout hello_world.txt
roll back unstaged changes
Undoing Commits (2)

cat hello_world.txt
Find the commit hash
git log --pretty=oneline
git revert <hash>
cat hello_world.txt
Your change is reverted to the previous commit
Can revert your revert if you like :-)
git diff

git diff shows the difference between staged and
unstaged changes
change hello_world.txt
git diff
git add .
git commit -m “update text”
git diff
git status
Branching

• Why branch?
 • Branch to conduct some exploratory
    work without impacting the work that
    others are doing in the master branch
 • Branch to backport changes to a old
    release
How to branch
Create a new branch called v2
git checkout -b v2
add a new file
touch v2.txt
change hello_world.txt
stage your changes
git add .
commit to the new branch
git commit -m “changes to v2 branch”
Switching branches is
     easy breezy
List all branches
git branch -a
Branch with * is active
switch to master
git checkout master
ls to view files
switch to v2
git checkout v2
ls to view files
Commit to a branch

Switch to master
git checkout master
touch master.txt
git add .
git commit -m “added master.txt”
git checkout v2
ls
How to Merge
What branch are we in?
git status
If not v2,
git checkout v2
Merge changes from master into v2
git merge master
ls
git status
Merge conflicts
git checkout master
edit hello_world.txt
git commit -am “update text in master”
git checkout v2
edit hello_world.txt and add different text
git commit -am “hello_world.txt in v2”
merge from master to v2
git merge master
you’ll be notified of a conflict - edit hello_world.txt to fix
git commit -am “hello_world.txt in v2”
git merge master
Git blame


• Shows who last modified the file or made
  the last commit
  git blame hello_world.txt
GitHub
• GitHub is a commercial site that allows you
  to host Git repositories
• Many open source projects host or mirror
  their repositories to GitHub
• Allows you to showcase your code to
  potential employers
• Possibly attract new contributors
• Learn from others!
Clone the course
      repository
Browse to this git tutorial
https://github.com/kmoir/Git-tutorial
find the clone url
cd /~
git clone git@github.com:kmoir/
Git-tutorial.git
cd Git-tutorial
git status
ls
Remote Repos
View active remotes
git remote -v
Get latest version and merge updates from
Remote
git pull <remote name> <local
branch>
git pull origin master
How to play well with
      others

Commit local changes
git commit -am “my latest commit”
pull any changes from remote repo
git pull origin master
push local changes to the remote
git push origin master
Beyond the command
        line
• Many IDEs have Git integration
• Example Eclipse + EGit
• htttp://download.eclipse.org
• Allow you to work seamlessly with Git
  repos from within your IDE
Eclipse Orion
• demo connecting to GitHub via Orion
• Request password here http://
  www.eclipse.org/orion
• Login here http://orionhub.org
• Clone the repo https://github.com/eclipse/
  orion.client.git
• http://wiki.eclipse.org/Orion/
  Getting_Started_with_Orion
Photo Credits
•   Linus Torvalds Wikipedia http://en.wikipedia.org/wiki/File:Linus_Torvalds.jpeg

•   Git utilization graph http://redmonk.com/sogrady/2011/11/28/you-wont-get-
    fired-for-using-apache/

•   Mozilla pins http://www.flickr.com/photos/flod/2221300134/sizes/z/in/
    photostream/

•   Women with laptops at Pop Life http://www.flickr.com/photos/yourdon/
    5157431891/sizes/l/in/photostream/

•   Merge http://www.flickr.com/photos/lex/43631705/sizes/o/in/photostream/

•   Merging Ryan Gosling http://programmerryangosling.tumblr.com/post/
    16921926583

•   X wing clones http://www.flickr.com/photos/pmiaki/5520399713/

•   Branches http://www.flickr.com/photos/e_phots/3012896283/

•   Stormtroopers with Linux http://www.flickr.com/photos/kalexanderson/
    6261634332/in/photostream/
Legal
•   Copyright Kim Moir 2012. All rights reserved. This
    presentation and source code are available under the
    Creative Commons Att. Nc Cd 3.0 License

•   Eclipse and the Eclipse logo are trademarks of the Eclipse
    Foundation, Inc.

•   Apache and the Apache logo are trademarks of the Apache
    Software Foundation

•   Linux and the Linux foundation logo are trademarks of the
    Linux foundation

•   Mozilla, Firefox, Thunderbird and their associated logos are
    trademarks of the Mozilla foundation
References
•   Pro Git book http://progit.org/

•   The Git parable http://tom.preston-werner.com/2009/05/19/the-git-parable.html

•   Girls Develop IT NYC Version Control with Git https://github.com/GDIAdmin/Git-
    Introduction

•   Git Hub help http://help.github.com

•   The Designer’s Guide to Git or: How I Learned to Stop Worrying and Love the Repository
    http://www.sitepoint.com/the-designers-guide-to-git-or-how-i-learned-to-stop-worrying-
    and-love-the-repository/

•   Git: The Lean, Mean, Distributed Machine http://www.slideshare.net/err/git-machine

•   You won’t get fired for Using Apache http://redmonk.com/sogrady/2011/11/28/you-wont-
    get-fired-for-using-apache/

•   The Rise of Git http://www.infoworld.com/d/application-development/torvaldss-git-the-it-
    technology-software-version-control-1`67799

•   Lars Vogel’s Git tutorial http://www.vogella.de/articles/Git/article.html

More Related Content

What's hot

Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil AliAmilAli1
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubBigBlueHat
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHubDSCVSSUT
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubGDSCIIITBbsr
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshareRakesh Sukumar
 
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
 
Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015mwrather
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash courseMireia Sangalo
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitColin Su
 
Git Introduction
Git IntroductionGit Introduction
Git IntroductionGareth Hall
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentationAyanaRukasar
 

What's hot (20)

Github Case Study By Amil Ali
Github Case Study By Amil AliGithub Case Study By Amil Ali
Github Case Study By Amil Ali
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
The Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHubThe Basics of Open Source Collaboration With Git and GitHub
The Basics of Open Source Collaboration With Git and GitHub
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 
HacktoberFest-Git&GitHub
HacktoberFest-Git&GitHubHacktoberFest-Git&GitHub
HacktoberFest-Git&GitHub
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
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, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015Introduction to Git, DrupalCamp LA 2015
Introduction to Git, DrupalCamp LA 2015
 
Git and GitHub crash course
Git and GitHub crash courseGit and GitHub crash course
Git and GitHub crash course
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git in 10 minutes
Git in 10 minutesGit in 10 minutes
Git in 10 minutes
 
Github
GithubGithub
Github
 
Github basics
Github basicsGithub basics
Github basics
 
Github
GithubGithub
Github
 
Git Introduction
Git IntroductionGit Introduction
Git Introduction
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentation
 

Similar to Let's Git this Party Started: An Introduction to Git and GitHub

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
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
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hubVenkat Malladi
 
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 and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
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 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
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github SahilSonar4
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 

Similar to Let's Git this Party Started: An Introduction to Git and GitHub (20)

Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
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
 
Intro to git and git hub
Intro to git and git hubIntro to git and git hub
Intro to git and git hub
 
Git presentation
Git presentationGit presentation
Git presentation
 
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
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
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 .
 
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
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Techoalien git
Techoalien gitTechoalien git
Techoalien git
 
Beginner's guide to git and github
Beginner's guide to git and github Beginner's guide to git and github
Beginner's guide to git and github
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
GIT.pptx
GIT.pptxGIT.pptx
GIT.pptx
 

More from Kim Moir

From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye codeKim Moir
 
Distributed Systems at Scale: Reducing the Fail
Distributed Systems at Scale:  Reducing the FailDistributed Systems at Scale:  Reducing the Fail
Distributed Systems at Scale: Reducing the FailKim Moir
 
Scaling mobile testing on AWS: Emulators all the way down
Scaling mobile testing on AWS: Emulators all the way downScaling mobile testing on AWS: Emulators all the way down
Scaling mobile testing on AWS: Emulators all the way downKim Moir
 
Scaling capacity while saving cash
Scaling capacity while saving cashScaling capacity while saving cash
Scaling capacity while saving cashKim Moir
 
Built to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxBuilt to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxKim Moir
 
Has it really been 10 years?
Has it really been 10 years?Has it really been 10 years?
Has it really been 10 years?Kim Moir
 
Migrating to Git: Rethinking the Commit
Migrating to Git:  Rethinking the CommitMigrating to Git:  Rethinking the Commit
Migrating to Git: Rethinking the CommitKim Moir
 
Eclipse Top Ten: Important lessons I've learned working on Eclipse
Eclipse Top Ten: Important lessons I've learned working on Eclipse Eclipse Top Ten: Important lessons I've learned working on Eclipse
Eclipse Top Ten: Important lessons I've learned working on Eclipse Kim Moir
 

More from Kim Moir (8)

From hello world to goodbye code
From hello world to goodbye codeFrom hello world to goodbye code
From hello world to goodbye code
 
Distributed Systems at Scale: Reducing the Fail
Distributed Systems at Scale:  Reducing the FailDistributed Systems at Scale:  Reducing the Fail
Distributed Systems at Scale: Reducing the Fail
 
Scaling mobile testing on AWS: Emulators all the way down
Scaling mobile testing on AWS: Emulators all the way downScaling mobile testing on AWS: Emulators all the way down
Scaling mobile testing on AWS: Emulators all the way down
 
Scaling capacity while saving cash
Scaling capacity while saving cashScaling capacity while saving cash
Scaling capacity while saving cash
 
Built to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxBuilt to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolbox
 
Has it really been 10 years?
Has it really been 10 years?Has it really been 10 years?
Has it really been 10 years?
 
Migrating to Git: Rethinking the Commit
Migrating to Git:  Rethinking the CommitMigrating to Git:  Rethinking the Commit
Migrating to Git: Rethinking the Commit
 
Eclipse Top Ten: Important lessons I've learned working on Eclipse
Eclipse Top Ten: Important lessons I've learned working on Eclipse Eclipse Top Ten: Important lessons I've learned working on Eclipse
Eclipse Top Ten: Important lessons I've learned working on Eclipse
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Let's Git this Party Started: An Introduction to Git and GitHub

  • 1. Let’s Git this Party Started An introduction to Git and GitHub @Kim_Moir
  • 2. Tonight’s agenda • Introduction • A short history of open source version control systems • Why Git and GitHub • Hands on exercises: Using Git, GitHub • Git concepts
  • 4. What is open source
  • 6. What is version control • A system to manage changes to digital artifacts • Examples: code, documentation, the possibilities are endless
  • 9. CVS and SVN Server John Paul Susan Kim Remy
  • 11. "I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git." --Linus Torvalds
  • 12. Source Control • Centralized all use a central repository: CVS, Subversion, Perforce • Distributed (DVCS) allow you to reconcile your local repository with a centralized one: Git, Mercurial
  • 13. Git Design Goals • Fast • Distributed • Each commit has a corresponding hash key • Everyone has a local copy of the history
  • 14. Development models Lieutenant Lieutenant Canonical repo Committers
  • 15. Another model Canonical repo Committers
  • 17. Installation steps • Install git • Setup ssh keys • Create github account and add ssh key • Setup your name and email in gitconfig • git config --list
  • 18. Check your installation first • Is git installed? Yes, if this command runs git • Is ssh installed and a key created? Yes, if this file exists ls ~/.ssh/id_rsa.pub
  • 19. Installing Git • Windows: http://help.github.com/win-set- up-git/ • Linux: http://help.github.com/linux-set-up- git/ • Mac: http://help.github.com/mac-set-up-git/
  • 20. Create a local repository Change to your home directory cd ~/ create a working directory mkdir my_repo cd my_repo ls -la to look at the directory git init ls -la Should see .git To check the status of your repo git status
  • 21. Git-ting help man <command> (print the online manual) program help (git help) <program> help command (git help init)
  • 22. Add files to your repo Create a file touch hello_world.txt Check repo status git status Git only tracks files we tell it to Add the file to the repo git add hello_world.txt git status File should now be tracked
  • 23. Changes and commits Open hello_world.txt and add some more text git status Stage the change git add hello_world.txt Commit the change git commit -m “added text” Create another file touch newfile.txt Add all untracked files in the current directory git add . Commit the change git commit -m “added newfile”
  • 24. Why do you need to add files? • Git tracks your changes, not your files • We are telling git to track the current state of the file when we add it • Staging is adding the file to the repository to be tracked • If you change a file, you also have to tell git to track the changed file
  • 25. What have you done? git log git log | grep newfile git log --pretty=oneline gitk
  • 26. Git archeology add text to hello_world.txt git add . git commit -m “added text” Find the commit hash git log --pretty=oneline checkout a previous commit git checkout <hash> cat hello_world.txt To return to the current version git checkout master
  • 27. Tags are better for Humans • The reality is that nobody types hashes to check out a commit • One approach is to use tags • Tags as a general practice are considered immutable • Tags are often used to record a moment in time for administrative purposes
  • 28. Tags Tag your current repo as version_one cat hello_world.txt git tag version_one checkout previous changeset git checkout version_one^ cat hello_world.txt tag the previous changeset as a RC git tag rc git checkout version_one Use gitk and git tag to view tags
  • 29. Undoing Local changes Return to master branch git checkout master If you haven’t committed change hello_world.txt git checkout hello_world.txt look at local copy of hello_world.txt Version of file is overwritten with the one from the repo
  • 30. Undoing Commits (1) If staged change hello_world.txt git add hello_world.txt git reset HEAD hello_world.txt This will unstage the change git checkout hello_world.txt roll back unstaged changes
  • 31. Undoing Commits (2) cat hello_world.txt Find the commit hash git log --pretty=oneline git revert <hash> cat hello_world.txt Your change is reverted to the previous commit Can revert your revert if you like :-)
  • 32. git diff git diff shows the difference between staged and unstaged changes change hello_world.txt git diff git add . git commit -m “update text” git diff git status
  • 33.
  • 34. Branching • Why branch? • Branch to conduct some exploratory work without impacting the work that others are doing in the master branch • Branch to backport changes to a old release
  • 35. How to branch Create a new branch called v2 git checkout -b v2 add a new file touch v2.txt change hello_world.txt stage your changes git add . commit to the new branch git commit -m “changes to v2 branch”
  • 36. Switching branches is easy breezy List all branches git branch -a Branch with * is active switch to master git checkout master ls to view files switch to v2 git checkout v2 ls to view files
  • 37. Commit to a branch Switch to master git checkout master touch master.txt git add . git commit -m “added master.txt” git checkout v2 ls
  • 38.
  • 39. How to Merge What branch are we in? git status If not v2, git checkout v2 Merge changes from master into v2 git merge master ls git status
  • 40. Merge conflicts git checkout master edit hello_world.txt git commit -am “update text in master” git checkout v2 edit hello_world.txt and add different text git commit -am “hello_world.txt in v2” merge from master to v2 git merge master you’ll be notified of a conflict - edit hello_world.txt to fix git commit -am “hello_world.txt in v2” git merge master
  • 41. Git blame • Shows who last modified the file or made the last commit git blame hello_world.txt
  • 42. GitHub • GitHub is a commercial site that allows you to host Git repositories • Many open source projects host or mirror their repositories to GitHub • Allows you to showcase your code to potential employers • Possibly attract new contributors • Learn from others!
  • 43.
  • 44.
  • 45.
  • 46. Clone the course repository Browse to this git tutorial https://github.com/kmoir/Git-tutorial find the clone url cd /~ git clone git@github.com:kmoir/ Git-tutorial.git cd Git-tutorial git status ls
  • 47. Remote Repos View active remotes git remote -v Get latest version and merge updates from Remote git pull <remote name> <local branch> git pull origin master
  • 48. How to play well with others Commit local changes git commit -am “my latest commit” pull any changes from remote repo git pull origin master push local changes to the remote git push origin master
  • 49. Beyond the command line • Many IDEs have Git integration • Example Eclipse + EGit • htttp://download.eclipse.org • Allow you to work seamlessly with Git repos from within your IDE
  • 50.
  • 51. Eclipse Orion • demo connecting to GitHub via Orion • Request password here http:// www.eclipse.org/orion • Login here http://orionhub.org • Clone the repo https://github.com/eclipse/ orion.client.git • http://wiki.eclipse.org/Orion/ Getting_Started_with_Orion
  • 52. Photo Credits • Linus Torvalds Wikipedia http://en.wikipedia.org/wiki/File:Linus_Torvalds.jpeg • Git utilization graph http://redmonk.com/sogrady/2011/11/28/you-wont-get- fired-for-using-apache/ • Mozilla pins http://www.flickr.com/photos/flod/2221300134/sizes/z/in/ photostream/ • Women with laptops at Pop Life http://www.flickr.com/photos/yourdon/ 5157431891/sizes/l/in/photostream/ • Merge http://www.flickr.com/photos/lex/43631705/sizes/o/in/photostream/ • Merging Ryan Gosling http://programmerryangosling.tumblr.com/post/ 16921926583 • X wing clones http://www.flickr.com/photos/pmiaki/5520399713/ • Branches http://www.flickr.com/photos/e_phots/3012896283/ • Stormtroopers with Linux http://www.flickr.com/photos/kalexanderson/ 6261634332/in/photostream/
  • 53. Legal • Copyright Kim Moir 2012. All rights reserved. This presentation and source code are available under the Creative Commons Att. Nc Cd 3.0 License • Eclipse and the Eclipse logo are trademarks of the Eclipse Foundation, Inc. • Apache and the Apache logo are trademarks of the Apache Software Foundation • Linux and the Linux foundation logo are trademarks of the Linux foundation • Mozilla, Firefox, Thunderbird and their associated logos are trademarks of the Mozilla foundation
  • 54. References • Pro Git book http://progit.org/ • The Git parable http://tom.preston-werner.com/2009/05/19/the-git-parable.html • Girls Develop IT NYC Version Control with Git https://github.com/GDIAdmin/Git- Introduction • Git Hub help http://help.github.com • The Designer’s Guide to Git or: How I Learned to Stop Worrying and Love the Repository http://www.sitepoint.com/the-designers-guide-to-git-or-how-i-learned-to-stop-worrying- and-love-the-repository/ • Git: The Lean, Mean, Distributed Machine http://www.slideshare.net/err/git-machine • You won’t get fired for Using Apache http://redmonk.com/sogrady/2011/11/28/you-wont- get-fired-for-using-apache/ • The Rise of Git http://www.infoworld.com/d/application-development/torvaldss-git-the-it- technology-software-version-control-1`67799 • Lars Vogel’s Git tutorial http://www.vogella.de/articles/Git/article.html

Editor's Notes

  1. \n
  2. -poll people to ask what operating systems they are running\n-verify that everyone has wireless working\n-mention break half way through\n-give out GitHub stickers and collect names for door prize\n-pass around USB key\n
  3. I&amp;#x2019;m honoured to be here tonight. This is my first time attending Girls Develop It Ottawa. How many of you are here for the first time?\n\nWho has used version control systems before? \nWho has used Git or GitHub before?\n\nMy name is Kim Moir and I&amp;#x2019;ve been involved in the open source Eclipse community for 10 years. I&apos;ll be starting a job as a release engineer at Mozilla in a few weeks. Anybody hear of Eclipse before? &amp;#xA0;Eclipse is an open source community that produces software tools for developers. &amp;#xA0;The Eclipse Foundation office is in Ottawa, on Centrepointe drive. &amp;#xA0;1000 committers, 70+ projects, millions of downloads. Release engineering &amp;#x201C;is concerned with the compilation, assembly, and delivery of source code into finished products or other software components.&amp;#x201C; (Wikipedia definition). As a result, just like software developers we spend a lot of time interacting with the version control system. &amp;#xA0;I have a business degree, not a computer science degree, so like many of you, I&amp;#x2019;ve learned a lot a long the way during my career. &amp;#xA0;Outside of work, I&amp;#x2019;m a long distance runner. &amp;#xA0;\n\n\n
  4. -Code is developed in the open under an open source license that allows people to redistribute and modify the code\n-Code can be inspected, downloaded and compiled by anyone\n-Contributions are welcome from the community\n-People can build upon this code and deliver commercial products that are based upon it\n\n
  5. Examples of open source communities\n\n-develop Apache web server, Linux operating system, Eclipse IDE, Mozilla Firefox and so on\n-Other examples Gentoo, Gnome, SPI etc\n-Open source foundations provide governance models, intellectual property management, marketing, and infrastructure for these communities\n-Git is also developed as a open source project (software freedom conservatory, hosted by GitHub)\n
  6. It&amp;#x2019;s a system that that tracks and provides control over changes to source code, or other types of digital artifacts. &amp;#xA0;Examples of source control you may have seen before. &amp;#xA0;Wikipedia where you can look at the revision history of a document. &amp;#xA0;Any other examples that people may have used?\nWhy do we need version control systems? &amp;#xA0;We need to be able to track changes to our code. &amp;#xA0;For instance, look back at the history and see what changes were made and who actually made them.. Be able to remove a change. &amp;#xA0;And contribute changes of your own. &amp;#xA0;For example, if the operating system on your laptop had a security bug that made it vulnerable, the software developers need to be able to go use the exact version of the code base that was used to build that version, and apply a patch to fix it. &amp;#xA0;Version control systems let you do that. &amp;#xA0;Without version control, there would be chaos.\n\n
  7. -People in many different timezones are collaborating on a book. They want to be able to make changes to their chapter without overwriting other author&amp;#x2019;s changes.\n-Also, it would be interesting to see what changes were made and when in the document\n-If there are changes that the editor doesn&amp;#x2019;t agree with, she can revert them back to the previous version\n-The editor can also see if people are actually working on the book :-)\n
  8. In the beginning, people didn&amp;#x2019;t have version control systems. &amp;#xA0;They just passed files around via email. &amp;#xA0;Very painful to merge changes. &amp;#xA0;\nImagine if you were a student and working on a group paper. You all started with a one page summary of what you were going to do and then added the content to your liking. The same thing would apply to a group of developers working on a common code base. \n\n\n
  9. \n In the 1990s, CVS was invented. &amp;#xA0;It was basically a model that allowed developers to check out copy of a centralized repository make local changes, and release or merge these changes back into the central server. &amp;#xA0;In the early 2000s, SVN was released and was supposed to overcome some of the problems with CVS. &amp;#xA0;\n Limitations of these centralized source control systems: &amp;#xA0;hard to track changes, difficult to branch and merge, everything you do is public since the public server controls all. Also, you have to deal with network latency when you contact the central server each time.\n
  10. Thus in 2005, Git was invented by Linus Torvalds who is famous for inventing something else. &amp;#xA0;Any guesses? Linux. &amp;#xA0;&amp;#xA0;Linux is an open source operating system that&amp;#x2019;s very popular around the world. &amp;#xA0;Most web sites run on the Linux operating system.\n\nWhy Git was developed\nThe Linux development team used to use a version control system called BitKeeper which they quite liked. However, the authors of BitKeeper withdrew their open source license and made it proprietary. &amp;#xA0;Thus the Linux kernel team had to find a new version control system. &amp;#xA0;And if you&amp;#x2019;ve spent your spare time writing an operating system, perhaps it&amp;#x2019;s not difficult to write a distributed version control system. &amp;#xA0;When asked why he named it Git, he said\n\n&quot;I&apos;m an egotistical bastard, and I name all my projects after myself. First Linux, now git.&quot;\n\nhttp://en.wikipedia.org/wiki/Git_%28software%29\n\nGit : English slang for a difficult or unpleasant person.\n
  11. \n
  12. \n
  13. It&amp;#x2019;s quite popular with many open source projects such as Android, Apache, Linux, Eclipse and more. &amp;#xA0;It&amp;#x2019;s also used within corporations.\n\nAdvantages and disadvantages of Git\n-distributed, fast, everyone has a copy of the local repo and its history\n-Since it contains all history, it&amp;#x2019;s easy to revert to a historical point in your source code\n-many models for organization for the development team\n\nDisadvantages\n-have to clone the entire repo if you want to just check out one project\n-learning curve\n\n\n\n
  14. define committers\nFor example: Linux kernel\nVery flexible\n
  15. \n Eclipse SDK project uses canonical repo which committers push and pull from, not each other explicitly\n As with any DCVS, an agreement is reached within the team on regarding how they would like to work\n
  16. Source Stephen O&amp;#x2019;Grady Redmonk\nGit usage is rising rapidly so it&amp;#x2019;s a good skill to learn\nAt the Eclipse foundation, we have been using CVS for 10 years, and half the projects recently finished migrating to Git. \n\n\n
  17. \n
  18. \n
  19. 1. Install git. (If you don&amp;#x2019;t already have it installed already)\n2. Setup ssh keys (if you don&amp;#x2019;t already have one generated on your machine) and copy to GitHub\n3. Setup name and email in git config\n4. API token setup isn&amp;#x2019;t necessary for this tutorial, can be skipped if you want\n\n
  20. \nKey concepts in Git &amp;#xA0;- cloning, branching, merging, committing, push to remote, pull, log, help, creating branches, switching branches\n-explain local versus remote repos\n-checksums are associated with every commit\n-Git client and server on various operating systems\n-look at git server config &amp;#xA0;- git config --list\n-git protocols:git, ssh, http\n-concept of commit rights since you have permissions on the repo, you commit to it\n-remote repos - you will have to have the correct permissions to push \n-can only push via ssh\n
  21. \n
  22. \n
  23. Difference between staging and committing\n
  24. \n
  25. git log can be used to look at the history of the repo\ngit log --pretty=oneline shows the hash tags associated with commits to the repo with the most recent commit first\ngitk - graphical view of the repo\n\n
  26. By default, master is the current branch in a git repo\ngit log --pretty=oneline shows commit history with most recent commit first\nYou can have many branches in a repo, we&amp;#x2019;ll talk more about that later\n\n
  27. Tags are a snapshot of a repository at a point in time\nFor instance, at Eclipse, we tagged the repos with a timestamp that reflected the time the build started. So we could go back in time and see what went into each build.\nEach tag tags the whole repo, not just a single file or directory\n\n
  28. To find your tag in a repo with a large number of tags\ngit tag -l | grep &lt;yourtag&gt;\n\n\n
  29. \n
  30. \n
  31. \n
  32. \n
  33. What is a branch?\nA branch in Git is a different version of the source code. &amp;#xA0;It starts as the copy of an existing branch. &amp;#xA0;The default branch is called master. &amp;#xA0;&amp;#xA0;&amp;#xA0;For instance, you may want to try to implement a new feature that will radically change how your product works. &amp;#xA0;So you may want to create a new branch so you can explore this work without disrupting the work of others. &amp;#xA0;When you&amp;#x2019;re sure that this feature is working and won&amp;#x2019;t break the build, you can merge the changes from this branch into the main development stream. &amp;#xA0;Another example: You need to fix a bug for a customer. &amp;#xA0;So you can branch the code base from the release branch and implement that &amp;#xA0;one fix for a new release. Ongoing work isn&apos;t touched.\n
  34. \n
  35. Look at branches in gitk\nyellow: tags\ngreen: branches\n
  36. Branching is Git is cheap\nCan have local branches that the server doesn&amp;#x2019;t know about\nWhen you branch in Git, the entire repo is branched\nIn CVS, you can branch just a single file or directory. Not in Git.\n
  37. Must commit to the branch before switching to another branch or your changes will be lost\n
  38. Merging is the opposite of branching\n While you&amp;#x2019;re working in your local branch on your awesome new feature, other people on your team will also be making changes.\n You want to keep your local branch current so that you have all the changes that other team members are contributing\n
  39. \n
  40. The same file may be changed by two different people at the same time in their version of the local repository\nAttempting to merge them may not work - you have a conflict\nYou need to modify the files before you move on\n\n
  41. \n
  42. -history of GitHub - open source and commercial aspects. &amp;#xA0;GitHub was launched in 2008 and is a web based service for hosting git repositories. &amp;#xA0;It&amp;#x2019;s a leader in social coding. &amp;#xA0;Just like you can follow someone on Twitter, you can follow a developer on GitHub and see the work that they are doing. &amp;#xA0;There is also issue tracking, so you can open bugs or feature requests against people&amp;#x2019;s code. &amp;#xA0;You can also look a graphs and see how project&amp;#x2019;s develop and who is contributing to them. &amp;#xA0;For example:\nWho&amp;#x2019;s contributing\nhttps://github.com/eclipse/orion.server/contributors\n\nImpact graph for Eclipse Orion\nhttps://github.com/eclipse/orion.client/graphs/impact\n\n-mention that code there is open source, what does open source mean, what benefits does it offer\n-very quick mention of open source business models, how this giving away software for money can make money\n\nWhy release your code as open source on GitHub?\n-Shows a portfolio of your work for potential employers\n-showcase your open source project to attempt to get new contributors providing fixes to your project.\n-Open Source projects are often mirrored to GitHub even though the primary development may take place on another server. &amp;#xA0;For instance, for legal reasons, all eclipse code is hosted on git.eclipse.org. &amp;#xA0;However, these projects are mirrored to GitHub. &amp;#xA0;\n-Allows you to focus on writing code, not managing infrastructure, just like any hosting infrastructure\n\n-many open source projects host mirror their projects to GitHub, give examples\n-can mirror both personal and professional projects (although this may depend on your employer - legal issues)\n\nThere are other hosting services for git repositories. For instance, Atlassian provides BitBucket which has similar capabilities\n\n
  43. -Software is social\n-Look at graphs in GitHub to see commit activity and code submitted\nFor example, look at Susan McCourt, Orion committer\nhttps://github.com/eclipse/orion.client/commits/master?author=sfmccourt\nhttps://github.com/sfmccourt &amp;#xA0;folllow\n-Watch a project or follow a person, learn in the open\n-Fork the code if desired\n
  44. Git clone\nA git clone is a local copy of a remote repository. &amp;#xA0;All history is copied locally. &amp;#xA0;You can then modify the local copy, and if you have permissions, push the changes up to a remote repository. &amp;#xA0;If you don&amp;#x2019;t have rights, you can create a pull request to ask the repository owner to accept the changes on your behalf and add them to the repository.\n
  45. \n
  46. \n
  47. could update content for class\n
  48. You must always integrate changes from the remote repository into your local copy before you can push up your changes\n\n
  49. Confession: I don&apos;t use the command line when I use Git to interact with the code repositories I work with\nBrief history of IDEs\nIDEs are integrated development environments i.e. Eclipse, NetBeans, IntelliJ. Many open source and commercial IDEs are available.\nBasically, they are desktop applications that providing tooling to you to make it easier to develop software i.e. automatic compilation, connecting to source code repositories, content assist, refactoring etc.\n
  50. -Clone repos, commit code, branch tag etc. all within your IDE\n
  51. \n
  52. \n
  53. \n
  54. \n