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:

More Related Content

PPTX
BitBucket presentation
PDF
git and github
PPTX
Introduction git
PDF
Starting with Git & GitHub
PPTX
Git 101 for Beginners
PPTX
Git & GitLab
KEY
Introduction To Git
PDF
Git training v10
BitBucket presentation
git and github
Introduction git
Starting with Git & GitHub
Git 101 for Beginners
Git & GitLab
Introduction To Git
Git training v10

What's hot (20)

PDF
Git real slides
PPTX
Github basics
PDF
Git for beginners
PDF
Learning git
PDF
Git basics
PPT
Git 101 - Crash Course in Version Control using Git
PDF
Introduction to Git
KEY
Git with bitbucket
PDF
Git Introduction Tutorial
PDF
Advanced Git Tutorial
PPTX
Git in 10 minutes
PPTX
Intro to git and git hub
PPTX
Bitbucket
PPT
Git basic
PPTX
GitLab.pptx
PPTX
Git One Day Training Notes
PPTX
Git and Github Session
PDF
Introduction to Git and GitHub
PPTX
Git - Basic Crash Course
PPTX
Git real slides
Github basics
Git for beginners
Learning git
Git basics
Git 101 - Crash Course in Version Control using Git
Introduction to Git
Git with bitbucket
Git Introduction Tutorial
Advanced Git Tutorial
Git in 10 minutes
Intro to git and git hub
Bitbucket
Git basic
GitLab.pptx
Git One Day Training Notes
Git and Github Session
Introduction to Git and GitHub
Git - Basic Crash Course
Ad

Viewers also liked (20)

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

Similar to Intro to Git, GitHub, and BitBucket (20)

KEY
Let's Git this Party Started: An Introduction to Git and GitHub
PPTX
Introduction to git hub
PDF
Git Pocket Guide A Working Introduction 1st Edition Richard E. Silverman
PDF
GDSC ZHCET GitHub Session.pdf
PPTX
Mini-training: Let’s Git It!
ODP
Git presentation
PPTX
GitHub Event.pptx
PPTX
Version controll.pptx
PDF
Git for developers
PDF
Harvard ABCD-WWW Git presentation
PPTX
Git and GitHub
PDF
Rc094 010d-git 2 - desconocido
PDF
Hello git
PPT
Git installation and configuration
PPTX
Version control git day02
PDF
Github and Git What the fuck is this shit .pdf
PDF
Git Init (Introduction to Git)
PDF
Getting Started with Git
PDF
Formation git
PPTX
Introduction to Git and Github
Let's Git this Party Started: An Introduction to Git and GitHub
Introduction to git hub
Git Pocket Guide A Working Introduction 1st Edition Richard E. Silverman
GDSC ZHCET GitHub Session.pdf
Mini-training: Let’s Git It!
Git presentation
GitHub Event.pptx
Version controll.pptx
Git for developers
Harvard ABCD-WWW Git presentation
Git and GitHub
Rc094 010d-git 2 - desconocido
Hello git
Git installation and configuration
Version control git day02
Github and Git What the fuck is this shit .pdf
Git Init (Introduction to Git)
Getting Started with Git
Formation git
Introduction to Git and Github

More from Legal Services National Technology Assistance Project (LSNTAP) (20)

PPT
Free and Low Cost Technology Tools for Legal Aid
PPTX
PPTX
PDF
Intro to data analysis framework april 25 2017
Free and Low Cost Technology Tools for Legal Aid
Intro to data analysis framework april 25 2017

Recently uploaded (20)

PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
DOCX
search engine optimization ppt fir known well about this
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PPTX
MuleSoft-Compete-Deck for midddleware integrations
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PPTX
Configure Apache Mutual Authentication
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Flame analysis and combustion estimation using large language and vision assi...
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
search engine optimization ppt fir known well about this
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Advancing precision in air quality forecasting through machine learning integ...
sustainability-14-14877-v2.pddhzftheheeeee
Early detection and classification of bone marrow changes in lumbar vertebrae...
future_of_ai_comprehensive_20250822032121.pptx
MuleSoft-Compete-Deck for midddleware integrations
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
giants, standing on the shoulders of - by Daniel Stenberg
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
Enhancing plagiarism detection using data pre-processing and machine learning...
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Configure Apache Mutual Authentication
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Lung cancer patients survival prediction using outlier detection and optimize...
Flame analysis and combustion estimation using large language and vision assi...

Intro to Git, GitHub, and BitBucket

  • 1. Using Git, GitHub, & BitBucket Gwen Daniels Illinois Legal Aid Online [email protected]
  • 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:

Editor's Notes

  • #6: 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.
  • #7: 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.
  • #8: 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.
  • #9: 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.
  • #10: 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.
  • #11: 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.
  • #12: 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.
  • #14: 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 [email protected]
  • #18: 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.
  • #20: 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
  • #21: 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.
  • #23: 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.
  • #25: So let’s do a quick tour of Github.
  • #28: 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.
  • #31: 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.
  • #32: 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.
  • #42: 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