SlideShare une entreprise Scribd logo
1  sur  41
Using Git, GitHub, &
BitBucket
Gwen Daniels
Illinois Legal Aid Online
gdaniels@illinoislegalaid.org
Who are you?
Survey Question
Which of these describe how you use Drupal?
Our program website runs on Drupal
Our statewide website runs on Open Advocate
Our statewide website runs on Drupal, but not Open Advocate
We don’t use Drupal
How would you describe your role on the website(s)?
I write code/custom modules for the website
I install contributed modules, install security updates on the website or edit
configuration information in Drupal’s user interface (for example, creating
content types, adding fields or changing permissions.
I’m a project manager; I sometimes have to deal with developers who work on
our website
I’m a content manager
None of these apply to me; I just want to know a bit more about Git.
What We’re
Covering
What is Git and why you
should be using it
Git setup and options
Git commands
Git hosting with GitHub
and Bitbucket
Where to go next
What is Git?
Code management
tool
Version control
Distributed
Why Use Git?
For our own projects
Acts as a backup
It lets us undo changes
It promotes collaboration
It organizes
To take advantage of other projects
But I’m not a
developer!
Drupal sites have probably have at
least 2 of these:
Custom modules
Contributed modules
Core modules
In Drupal 8: Configuration lives in
code, not the database.
In Drupal 7, configuration lives in
the database but can (and should)
live in code via Features.
How Do I Work
With Git?
Command line
Using a GUI
GitHub client
SourceTree
Within your development
IDE (PhpStorm,
NetBeans, Eclipse,
Sublime Text)
Getting Git
For Windows:
Download from https://git-scm.com or
Install a GUI like GitHub or Sourcetree
For Mac
Open Terminal and type git; you’ll be prompted to install the
Xcode command line tools OR
Same options as Windows
For Linux:
The Git process
Demo
Walking through Git: Common Tasks
Git init: Create a Git repository
Git clone: to copy an existing repo with git clone
Git add: to add files to Git
Git commit: to commit those files to your local copy
Add -m and a message and describe what you did: git
commit -m ‘I did something’
Walking through Git: Interacting with Remote
Repositories
Add a remote repository using git remote add [name] [url]
Git pull: Push your commits to the remote repository
Git push: Pull the latest changes from the remote repository
Keeping track of things...
Get help with git --help or git --help command
See with list of files you’ve changed with git status
View your commit history with git log (or git log
remote/branch)
Compare changes with git diff
Advanced Git
Using Branches
By default, everything is in the Master branch
Branches let you:
Keep the master branch clean of “in development” code
changes
Makes a copy of the then-existing master branch
All work is then done in the new branch
Only commit to master when you are done
You can publish your branch to share
Working with branches
Get a list of branches using git branch
Create a branch using git branch [branch name]
Delete a branch using git branch -d [branch name]
Merge your branch git merge master [branch name]
Tags
Tags let you:
Mark a specific point in time
Is essentially a branch that you can not change
List all your tags with git tag
Create a new tag with git tag ‘name’ -m ‘message’
Push a tag with git push origin ‘name’
Reverting changes
Use git checkout -- . or git reset --hard HEAD to revert any
uncommitted file back to the current state
Use git checkout [commit] [file] to change your local
working copy to an old version. [File] is optional.
Use git revert [commit] to undo all the work in that commit
and create a new commit undoing those changes
GitHub & Bitbucket
What are Github and BitBucket?
Cloud-hosted repositories
Public and private repositories
Both offer additional tools:
Issue tracking
Wikis
Nice user interfaces
Webhooks and services to integrate with other systems
Differences
GitHub
Integrates well with the
Github client
Free for public repositories
Private repositories start at
$7/month
Nonprofit pricing
Bitbucket
Integrates well with
SourceTree
Free for public repositories
and small teams (less
than 5 people)
Seamless integration with
other Atlassian products,
like Jira
Github
Home of many open source
projects
DLaw
Q & A markup
Learn the Law
Jonathan Pyle’s DocAssemble
Code Repository
Create or switch branches
Add new file, upload files
View, or edit files live in the browser
Manage Your Issues
Creating an issue
Email notifications
Pull Requests
GitHub Wiki
BitBucket
Source
Create or change branches
Online Editing…
Issue Tracking
Pull Requests
Wiki
Learn More…
Try git in the cloud: https://try.github.io/levels/1/challenges/1
Git Cheat Sheet: https://www.git-tower.com/blog/git-cheat-
sheet/
Git Workflows:
https://www.atlassian.com/git/tutorials/comparing-workflows/
Slides at:

Contenu connexe

Tendances

Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshareRakesh Sukumar
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Omar Fathy
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash CourseNilay Binjola
 
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
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Noa Harel
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to GitLukas Fittl
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentationAyanaRukasar
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 

Tendances (20)

Introduction to github slideshare
Introduction to github slideshareIntroduction to github slideshare
Introduction to github slideshare
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Introduction to git & GitHub
Introduction to git & GitHubIntroduction to git & GitHub
Introduction to git & GitHub
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1Introduction to Git and GitHub Part 1
Introduction to Git and GitHub Part 1
 
Git - Basic Crash Course
Git - Basic Crash CourseGit - Basic Crash Course
Git - Basic Crash Course
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Git for beginners
Git for beginnersGit for beginners
Git for beginners
 
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
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Git basic
Git basicGit basic
Git basic
 
Github basics
Github basicsGithub basics
Github basics
 
Git hub ppt presentation
Git hub ppt presentationGit hub ppt presentation
Git hub ppt presentation
 
Bitbucket
BitbucketBitbucket
Bitbucket
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 

En vedette

Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Parag Gajbhiye
 
Gitt and Git-flow
Gitt and Git-flowGitt and Git-flow
Gitt and Git-flowMd. Masud
 
Intro To Version Control
Intro To Version ControlIntro To Version Control
Intro To Version Controlceardach
 
Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialTed Naleid
 
Introduction to Version Control System for Windows
Introduction to Version Control System for WindowsIntroduction to Version Control System for Windows
Introduction to Version Control System for WindowsPeter Chang
 
An introduction to Version Control Systems
An introduction to Version Control SystemsAn introduction to Version Control Systems
An introduction to Version Control SystemsJon Warbrick
 
Version Control Systems - ArabNet Beirut 2014 - Dani Arnaout
Version Control Systems - ArabNet Beirut 2014 - Dani ArnaoutVersion Control Systems - ArabNet Beirut 2014 - Dani Arnaout
Version Control Systems - ArabNet Beirut 2014 - Dani ArnaoutDani Arnaout
 
Git + gitlab + sourcetree
Git + gitlab + sourcetreeGit + gitlab + sourcetree
Git + gitlab + sourcetree현우 고
 
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developersAtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developersAtlassian
 
AtlasCamp 2015: Builders advancing humanity: Past to future
AtlasCamp 2015: Builders advancing humanity: Past to futureAtlasCamp 2015: Builders advancing humanity: Past to future
AtlasCamp 2015: Builders advancing humanity: Past to futureAtlassian
 
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...Atlassian
 
01 - Introduction to Version Control
01 - Introduction to Version Control01 - Introduction to Version Control
01 - Introduction to Version ControlSergii Shmarkatiuk
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceKlea Kolaric
 
FishEye and Crucible Presentation
FishEye and Crucible PresentationFishEye and Crucible Presentation
FishEye and Crucible PresentationEllen Feaheny
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systemsTim Staley
 
The Fisheye Analytics media lens training deck
The Fisheye Analytics media lens training deckThe Fisheye Analytics media lens training deck
The Fisheye Analytics media lens training deckFisheye Analytics
 
Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011pointstechgeeks
 

En vedette (20)

Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
Introduction to Git(BitBucket) , Continuous Integration (Bamboo) & Confluence
 
Bitbucket and git
Bitbucket and gitBitbucket and git
Bitbucket and git
 
Gitt and Git-flow
Gitt and Git-flowGitt and Git-flow
Gitt and Git-flow
 
Intro To Version Control
Intro To Version ControlIntro To Version Control
Intro To Version Control
 
Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With Mercurial
 
Introduction to Version Control System for Windows
Introduction to Version Control System for WindowsIntroduction to Version Control System for Windows
Introduction to Version Control System for Windows
 
An introduction to Version Control Systems
An introduction to Version Control SystemsAn introduction to Version Control Systems
An introduction to Version Control Systems
 
Version Control Systems - ArabNet Beirut 2014 - Dani Arnaout
Version Control Systems - ArabNet Beirut 2014 - Dani ArnaoutVersion Control Systems - ArabNet Beirut 2014 - Dani Arnaout
Version Control Systems - ArabNet Beirut 2014 - Dani Arnaout
 
Git + gitlab + sourcetree
Git + gitlab + sourcetreeGit + gitlab + sourcetree
Git + gitlab + sourcetree
 
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developersAtlasCamp 2015:  Bitbucket: Building kick-ass tools for 2.5M developers
AtlasCamp 2015: Bitbucket: Building kick-ass tools for 2.5M developers
 
AtlasCamp 2015: Builders advancing humanity: Past to future
AtlasCamp 2015: Builders advancing humanity: Past to futureAtlasCamp 2015: Builders advancing humanity: Past to future
AtlasCamp 2015: Builders advancing humanity: Past to future
 
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
Making the Switch: One Team's Story of Adopting JIRA, FishEye, Eclipse & Myly...
 
01 - Introduction to Version Control
01 - Introduction to Version Control01 - Introduction to Version Control
01 - Introduction to Version Control
 
Continuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for SalesforceContinuous Integration with Bamboo for Salesforce
Continuous Integration with Bamboo for Salesforce
 
FishEye and Crucible Presentation
FishEye and Crucible PresentationFishEye and Crucible Presentation
FishEye and Crucible Presentation
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
A brief introduction to version control systems
A brief introduction to version control systemsA brief introduction to version control systems
A brief introduction to version control systems
 
The Fisheye Analytics media lens training deck
The Fisheye Analytics media lens training deckThe Fisheye Analytics media lens training deck
The Fisheye Analytics media lens training deck
 
Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011Points.com fisheye crucible code reviews 2011
Points.com fisheye crucible code reviews 2011
 

Similaire à Intro to Git, GitHub, and BitBucket

introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfBruceLee275640
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and githubAderemi Dadepo
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubalidor4702
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git聖文 鄭
 
Using Git to Organize Your Project
Using Git to Organize Your ProjectUsing Git to Organize Your Project
Using Git to Organize Your ProjectManish Suwal 'Enwil'
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptxHitesh670643
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GITGhadiAlGhosh
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfAmarnadh36
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfbadrfathallah2
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptxEshaan35
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer CheatsheetAbdul Basit
 

Similaire à Intro to Git, GitHub, and BitBucket (20)

introductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdfintroductiontogitandgithub-120702044048-phpapp01.pdf
introductiontogitandgithub-120702044048-phpapp01.pdf
 
Introduction to git and github
Introduction to git and githubIntroduction to git and github
Introduction to git and github
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
GITHappens, powerpoint about git and github
GITHappens, powerpoint about git and githubGITHappens, powerpoint about git and github
GITHappens, powerpoint about git and github
 
14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx14 oct Git & GitHub.pptx
14 oct Git & GitHub.pptx
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
Brief tutorial on Git
Brief tutorial on GitBrief tutorial on Git
Brief tutorial on Git
 
Using Git to Organize Your Project
Using Git to Organize Your ProjectUsing Git to Organize Your Project
Using Git to Organize Your Project
 
Git Series - Part 1
Git Series - Part 1 Git Series - Part 1
Git Series - Part 1
 
Git presentation
Git presentationGit presentation
Git presentation
 
GIT By Sivakrishna
GIT By SivakrishnaGIT By Sivakrishna
GIT By Sivakrishna
 
Git Training
Git TrainingGit Training
Git Training
 
github-actions.pdf
github-actions.pdfgithub-actions.pdf
github-actions.pdf
 
Day 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptxDay 2_ Get Git with It! A Developer's Workshop.pptx
Day 2_ Get Git with It! A Developer's Workshop.pptx
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 
Getting started With GIT
Getting started With GITGetting started With GIT
Getting started With GIT
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
A Tutorial for GitHub.pdf
A Tutorial for GitHub.pdfA Tutorial for GitHub.pdf
A Tutorial for GitHub.pdf
 
Git Session 2K23.pptx
Git Session 2K23.pptxGit Session 2K23.pptx
Git Session 2K23.pptx
 
Git Developer Cheatsheet
Git Developer CheatsheetGit Developer Cheatsheet
Git Developer Cheatsheet
 

Plus de Legal Services National Technology Assistance Project (LSNTAP)

Plus de Legal Services National Technology Assistance Project (LSNTAP) (20)

Language Access Webinar
Language Access WebinarLanguage Access Webinar
Language Access Webinar
 
Free and Low Cost Technology Tools for Legal Aid
Free and Low Cost Technology Tools for Legal AidFree and Low Cost Technology Tools for Legal Aid
Free and Low Cost Technology Tools for Legal Aid
 
50 Tech Tips
50 Tech Tips50 Tech Tips
50 Tech Tips
 
Sharelaw + Video Tips
Sharelaw + Video TipsSharelaw + Video Tips
Sharelaw + Video Tips
 
Intro to UX
Intro to UXIntro to UX
Intro to UX
 
Online Dispute Resolution
Online Dispute ResolutionOnline Dispute Resolution
Online Dispute Resolution
 
Supporting Mobile Pro Bono Attorneys
Supporting Mobile Pro Bono AttorneysSupporting Mobile Pro Bono Attorneys
Supporting Mobile Pro Bono Attorneys
 
Guide to Office 365
Guide to Office 365Guide to Office 365
Guide to Office 365
 
The State of E-Filing 2017
The State of E-Filing 2017The State of E-Filing 2017
The State of E-Filing 2017
 
Intro to Data Analysis Framework
Intro to Data Analysis Framework Intro to Data Analysis Framework
Intro to Data Analysis Framework
 
Language Access for Legal Aid Websites
Language Access for Legal Aid WebsitesLanguage Access for Legal Aid Websites
Language Access for Legal Aid Websites
 
Teaching Your Staff About Phishing
Teaching Your Staff About PhishingTeaching Your Staff About Phishing
Teaching Your Staff About Phishing
 
Data Visualization Tools
Data Visualization ToolsData Visualization Tools
Data Visualization Tools
 
Data Visualization Tools
Data Visualization Tools Data Visualization Tools
Data Visualization Tools
 
Creating a Technology Disaster Plan
Creating a Technology Disaster PlanCreating a Technology Disaster Plan
Creating a Technology Disaster Plan
 
Factors in Software Selection
Factors in Software SelectionFactors in Software Selection
Factors in Software Selection
 
Can i work remotely
Can i work remotelyCan i work remotely
Can i work remotely
 
Intro to data analysis framework april 25 2017
Intro to data analysis framework april 25 2017Intro to data analysis framework april 25 2017
Intro to data analysis framework april 25 2017
 
LSC Tech Baselines
LSC Tech BaselinesLSC Tech Baselines
LSC Tech Baselines
 
Legal Aid Tech Baseline 2016
Legal Aid Tech Baseline 2016 Legal Aid Tech Baseline 2016
Legal Aid Tech Baseline 2016
 

Dernier

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
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
 
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
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Dernier (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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
 
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
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Intro to Git, GitHub, and BitBucket

  • 1. Using Git, GitHub, & BitBucket Gwen Daniels Illinois Legal Aid Online gdaniels@illinoislegalaid.org
  • 3. Survey Question Which of these describe how you use Drupal? Our program website runs on Drupal Our statewide website runs on Open Advocate Our statewide website runs on Drupal, but not Open Advocate We don’t use Drupal
  • 4. How would you describe your role on the website(s)? I write code/custom modules for the website I install contributed modules, install security updates on the website or edit configuration information in Drupal’s user interface (for example, creating content types, adding fields or changing permissions. I’m a project manager; I sometimes have to deal with developers who work on our website I’m a content manager None of these apply to me; I just want to know a bit more about Git.
  • 5. What We’re Covering What is Git and why you should be using it Git setup and options Git commands Git hosting with GitHub and Bitbucket Where to go next
  • 6. What is Git? Code management tool Version control Distributed
  • 7. Why Use Git? For our own projects Acts as a backup It lets us undo changes It promotes collaboration It organizes To take advantage of other projects
  • 8. But I’m not a developer! Drupal sites have probably have at least 2 of these: Custom modules Contributed modules Core modules In Drupal 8: Configuration lives in code, not the database. In Drupal 7, configuration lives in the database but can (and should) live in code via Features.
  • 9. How Do I Work With Git? Command line Using a GUI GitHub client SourceTree Within your development IDE (PhpStorm, NetBeans, Eclipse, Sublime Text)
  • 10. Getting Git For Windows: Download from https://git-scm.com or Install a GUI like GitHub or Sourcetree For Mac Open Terminal and type git; you’ll be prompted to install the Xcode command line tools OR Same options as Windows For Linux:
  • 12. Demo
  • 13. Walking through Git: Common Tasks Git init: Create a Git repository Git clone: to copy an existing repo with git clone Git add: to add files to Git Git commit: to commit those files to your local copy Add -m and a message and describe what you did: git commit -m ‘I did something’
  • 14. Walking through Git: Interacting with Remote Repositories Add a remote repository using git remote add [name] [url] Git pull: Push your commits to the remote repository Git push: Pull the latest changes from the remote repository
  • 15. Keeping track of things... Get help with git --help or git --help command See with list of files you’ve changed with git status View your commit history with git log (or git log remote/branch) Compare changes with git diff
  • 17. Using Branches By default, everything is in the Master branch Branches let you: Keep the master branch clean of “in development” code changes Makes a copy of the then-existing master branch All work is then done in the new branch Only commit to master when you are done You can publish your branch to share
  • 18. Working with branches Get a list of branches using git branch Create a branch using git branch [branch name] Delete a branch using git branch -d [branch name] Merge your branch git merge master [branch name]
  • 19. Tags Tags let you: Mark a specific point in time Is essentially a branch that you can not change List all your tags with git tag Create a new tag with git tag ‘name’ -m ‘message’ Push a tag with git push origin ‘name’
  • 20. Reverting changes Use git checkout -- . or git reset --hard HEAD to revert any uncommitted file back to the current state Use git checkout [commit] [file] to change your local working copy to an old version. [File] is optional. Use git revert [commit] to undo all the work in that commit and create a new commit undoing those changes
  • 22. What are Github and BitBucket? Cloud-hosted repositories Public and private repositories Both offer additional tools: Issue tracking Wikis Nice user interfaces Webhooks and services to integrate with other systems
  • 23. Differences GitHub Integrates well with the Github client Free for public repositories Private repositories start at $7/month Nonprofit pricing Bitbucket Integrates well with SourceTree Free for public repositories and small teams (less than 5 people) Seamless integration with other Atlassian products, like Jira
  • 24. Github Home of many open source projects DLaw Q & A markup Learn the Law Jonathan Pyle’s DocAssemble
  • 26. Create or switch branches
  • 27. Add new file, upload files
  • 28. View, or edit files live in the browser
  • 36. Create or change branches
  • 40. Wiki
  • 41. Learn More… Try git in the cloud: https://try.github.io/levels/1/challenges/1 Git Cheat Sheet: https://www.git-tower.com/blog/git-cheat- sheet/ Git Workflows: https://www.atlassian.com/git/tutorials/comparing-workflows/ Slides at:

Notes de l'éditeur

  1. We are covering 5 things today: what Git is and why it matters, git setup and options for working with git. I’ll walk through the basic Git commands, and then do a demo of GitHub and Bitbucket’s cloud Git hosting. Finally, I’ll share some resources for next steps.
  2. So what is Git? It’s like document management for code. There is a master repository and then everyone who accesses that has their own local repository and a complete copy of the files. If I edit something in my working copy, I commit it to my local repository and when I’m ready to share it, I publish it to the master repository. If I screw up my working copy, I can erase what I’ve done and it hasn’t affected anything else. And if we push something bad ot the master, we can undo it.
  3. First, why should we use version control? There’s 2 reasons: one to make our own development projects better and second, to take advantage of everyone else’s stuff. For our own projects, Git brings order to chaos. It provides us with a history of the changes we’ve made and we can roll back. It organizes those changes in a structure we don’t really have to care about unless we need to roll back and it means if we have multiple people working on things, there isn’t a lot of stepping on toes or “wait, I’m not done using that file” kind of things. But beyond our own work, there’s a huge amount of open source projects, mostly on Github, that we can use, modify, and contribute back if we know just a little bit of git. Some examples just within our own community are qnamarkup, Connecticut’s classroom module, and the entire DLAW template are all hosted on Github.
  4. I know there are at least a few websites in the community that don’t have a single custom module and don’t write any of your own code, so why should you still be using Git? Because somebody is making changes to the code that runs your Drupal website. In Drupal, Git is useful in 3 places. The obvious use case is if you write your own code via custom modules But even if you are just using contributed modules, someone is changing that code periodically. By using git, every time you update, you can more easily revert a bad thing or if you need to apply a patch to a contributed module, you can commit those patches to git to help you remember to recommit them next time the module changes. And finally, configuration. Everytime you change a setting in your Drupal site, it changes somewhere. In Drupal 8, it lives in code. In Drupal 7, in the database. So out of the box, you can leverage git to rollback a bad configuration change. In Drupal 7, if you use the Features module to keep your configuration in code, you can do the same thing. So if all you do is break a view, if it is in code, you can undo it to the last known good state.
  5. To use Git, you have really 3 options: the command line, a client application like Github client or Atlassian’s SourceTree (both free) and most development IDEs, such as phpstorm, eclipse, netbeans, sublime text, include git tools or have plugins to add git tools. It’s largely a matter of preference and while I mostly use the command line, sometimes I do things directly in phpstorm as well. As I walk through the commands, I’ll demo in both the command line and a client.
  6. But to use git, you need to install it. I am not going to demo how to install git but this slide has the links for Mac, Windows, and Linux operating systems.
  7. Git works largely on adds, commits, and pushes. You work in the working directory that is local on your machine. When you add your files to git, it moves it to a staging area. When you commit, it updates your local repository and creates a record of your changes. If you push your changes to a remote repository, that commit gets recorded there as well. If you pull from a remote repository, your local repository gets updated.
  8. And now to walk through some basic steps. I’ve created a couple local folders on my desktop that I’m going to use. Let’s start with the command line demo. git remote add origin https://github.com/gadaniels/demo-command.git Tell Git who you are: git config --global user.name "Gwen Daniels" git config --global user.email gdaniels@illinoislegalaid.org
  9. So now you know the basic everyday git commands. One of the most powerful things in git is being able to have different branches. By default, everything is in the master branch. But if that’s what is on your website, you might want to test or develop in a different branch and then merge them together. Let’s walk through that.
  10. Besides branches, there are tags. Tags are essentially snapshots of a branch at a specific point in time. We use tags a lot at ILAO to mark sprint releases. Every 2 weeks set of code changes, gets tagged with a name and then pushed up to production. We don’t actually use the master branch directly. I can deploy a tag or roll back to a tag just like i would with branches or master
  11. And finally, one of the biggest powers of git is in the ability to undo your changes. You can undo local work using checkout or use revert to undo committed work.
  12. So that’s a basic overview of Git. So what are GitHub and Bitbucket? Well, they are hosted versions of Git. They are very similar. We’ve used GitHub for several years at ILAO but are thinking about Bitbucket because we use Jira, another Atlassian product, for our software development project management. Again, it’s a lot of personal preference.
  13. So let’s do a quick tour of Github.
  14. I can, from within my browser, create a new file and commit it. While this isn’t probably normal behavior, it can be useful in emergency situations.
  15. I can create an isuse, label it, tag it to a milestone, and or assign it to someone. If I assign it to someone, it notifies them via email.
  16. Github will automatically notify the creator of a comment when someone comments on an issue. I can just reply in my email and it will post.
  17. Git is free, github client, source tree are both free, both github and bitbucket will let you have at least a free public repository so the best next step if you want to do more with git is to try it. Another option is this try.github.io