SlideShare a Scribd company logo
Git Version Control for the Complete N00b by Adam LaBarge
What is Git? What is version control?
Version Control: Version control is a system that records changes to a file/s over time
so that you can recall specific versions later.
GIT: Git is version control software developed by Linus Torvalds aimed at being faster,
distributed and focused on data.
- snapshots of data over time (states)
- nearly every operation is local
- integrity with checksums
- git generally only adds data
Git files states. “Now pay attention”
The 3 states of a file.
COMMITTED: Data has been safely stored into the local database.
MODIFIED: File/s have changed, but they are not yet safely stored. (committed)
STAGED: File/s have been marked for commit.
WHY USE IT?
- Easier than making your own version control system in your file system with new
folders and different copies of this and that.
- Better history and operations structure.
- Remote repositories allow for data integrity and backup of files.
- Working in a team in a manageable way.
- True me, the day will come when you are very thankful you are using it.
HOW TO INSTALL
Git is a command line application. There is no GUI app by default.
Mac: download the install app and proceed
Windows: download ‘git for windows’ app and proceed
Linux: command line install
PICK A GUI APP (HTTPS://GIT-SCM.COM/DOWNLOADS/GUIS)
DO I NEED GIT REPOSITORY HOSTING SERVICE
Technically, no. But yes, you really do!
What is it?
- a place to externally house your file/s changes
- manage access to code base
- wikis and other services (error checking, QA testing, etc)
Options:
- GitHub. - GitLab Account Types:
- BitBucket - Heroku Free vs. Private
GIT COMMANDS
Commit – saving code changes to the database
Push – pushing committed code to a repository
Pull – pulling committed code from a repository & merging
Fetch – pulling committed code from a repository
Branch/Fork – splitting the code base into a new version
Merge – combining two versions of code
Revert – going back to a previous history stage
Checkout/Reset – setting a file/s back to the committed state in the repo
Conflict – when Git does not know how to auto merge code
USING GIT
Create a .gitignore file (file/s we don’t want in the repository)
Create a Git instance
- Export the /.git directory
- config
Add remote repository
Add files to commit
Commit files
Push to remote repository
Now lets make changes, forks, commits
GIT WORK FLOWS
USING GIT IN DEPLOYMENT
SSH – command line git on your stage and production servers (preferred method)
Hosting companies own versions.
- WP-Engine
- ssh keys, pushing from command line, error testing code
- Pantheon
- similar but everything is controlled via their GUI
Positives & Negatives:
- in some ways it is easier – docs have been written, someone else thinking for you
- when changes are made directly to server, is a PITA to get it into the repository
WAYS TO MAKE GIT EASY
- Always try to move forward
- Try never to revert (the revert work around with GitHub downloads)
- Don’t be scared to make mistakes
- If in doubt, copy everything out, start again
- Learn your host repository interface, they are there to help
- Write logical commit messages
- $ git status
- $ git checkout –b {branch}
- $ git pull origin {branch}
OH SNAP! NOW WHAT
Google and tutorials
- stackoverflow.com has many great answers
- http://rogerdudler.github.io/git-guide/
- https://git-scm.com/about

More Related Content

PPSX
Git the fast version control system
PPTX
Version control system and Git
PPTX
Version control system
PDF
Collaborative development with Git | Workshop
ODP
Introduction to Version Control
PPT
Version Control System
PPTX
Git basics
PPTX
Git basics
Git the fast version control system
Version control system and Git
Version control system
Collaborative development with Git | Workshop
Introduction to Version Control
Version Control System
Git basics
Git basics

What's hot (18)

PPTX
Svn vs mercurial vs github
PPTX
Git learn from scratch
PDF
What is version control software and why do you need it?
PDF
Git 入门与实践
PDF
Version Control & Git
PDF
Git basics
PPTX
Git hub_pptx
PDF
Git hub
PDF
Version control system
PPTX
Quick and easy way to get started with Git & GitHub
PPT
Introduction to Git
PPTX
01 - Git vs SVN
PPTX
Git presentation, Viktor Pyskunov
PDF
Git tutorial II
PPTX
GitHub Presentation
ODP
Evolution of Version Control In Open Source
Svn vs mercurial vs github
Git learn from scratch
What is version control software and why do you need it?
Git 入门与实践
Version Control & Git
Git basics
Git hub_pptx
Git hub
Version control system
Quick and easy way to get started with Git & GitHub
Introduction to Git
01 - Git vs SVN
Git presentation, Viktor Pyskunov
Git tutorial II
GitHub Presentation
Evolution of Version Control In Open Source
Ad

Viewers also liked (17)

PDF
Is Your (Client's) Website Ready for 2017?
PDF
WordPress and Business Intelligence
KEY
bbPress - WCSF 2012
PPT
WordPress SEO Revisited by Lou Anne McKeefery of Be Found
KEY
WCSF 2012 - All You Can Eat Content Types
PDF
WordPress Gallery tutorial
PDF
High Performance WordPress
PDF
State of Mobile
PDF
Designing for The Modern Web
PDF
WordPress State of the Word 2012
PDF
WordPress Comments (November Meetup)
PDF
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
PDF
Making WordPress Easier to Use
PDF
PhpStorm for WordPress
PDF
Rob La Gatta; Making the Events Calendar Sit Up and Beg
PPTX
Hands on with google analytics
PDF
Real Developer Tools for WordPress by Stefan Didak
Is Your (Client's) Website Ready for 2017?
WordPress and Business Intelligence
bbPress - WCSF 2012
WordPress SEO Revisited by Lou Anne McKeefery of Be Found
WCSF 2012 - All You Can Eat Content Types
WordPress Gallery tutorial
High Performance WordPress
State of Mobile
Designing for The Modern Web
WordPress State of the Word 2012
WordPress Comments (November Meetup)
Sallie Goetsch: Making the Events Calendar Sit Up and Beg
Making WordPress Easier to Use
PhpStorm for WordPress
Rob La Gatta; Making the Events Calendar Sit Up and Beg
Hands on with google analytics
Real Developer Tools for WordPress by Stefan Didak
Ad

Similar to Git Version Control for the Complete N00b by Adam LaBarge (20)

PDF
Harvard ABCD-WWW Git presentation
PDF
Git for developers
ODP
Git presentation
PPTX
Version Control with Git
PPTX
Introduction to git hub
PPTX
Do you git it
PDF
Git basic introduction & tutorial for begginer
PPTX
Lets git to it
ODP
Git for standalone use
PPTX
Git Basics for Software Version Management
PDF
Intro to Version Control with Git and Github
PDF
Git and Github - A primer
PPTX
Getting Git...before it gets you
PPTX
GIT.pptx
PPTX
Git and github
PPTX
git github PPT_GDSCIIITK.pptx
PDF
Git for folk who like GUIs
PPTX
Git and Github
Harvard ABCD-WWW Git presentation
Git for developers
Git presentation
Version Control with Git
Introduction to git hub
Do you git it
Git basic introduction & tutorial for begginer
Lets git to it
Git for standalone use
Git Basics for Software Version Management
Intro to Version Control with Git and Github
Git and Github - A primer
Getting Git...before it gets you
GIT.pptx
Git and github
git github PPT_GDSCIIITK.pptx
Git for folk who like GUIs
Git and Github

More from East Bay WordPress Meetup (20)

PDF
How to Conduct an SEO Audit
PPTX
WordPress Membership Plugins: WP-Members
PPTX
WordPress Membership Plugins: MemberPress
PDF
How to Develop a Color Palette for Your Website with Amanada McCoy
PDF
Event Management Plugins for WordPress
PDF
Beyond Gravity Forms: Form Plugins for WordPress
PDF
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
PDF
March 2015: Plugins Worth Paying For
PDF
Google Webmaster Tools for WordPress
PDF
Introduction to Google Analytics by Katherine Mancuso
PDF
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
PDF
Running a WordPress Business--Some Numbers
PPTX
What Developers Need Designers to Know about WordPress
PDF
Making WordPress Fly
PDF
Drag-and-drop WordPress Themes, featuring Themify Builder
PDF
Drag and-Drop WordPress Themes
PDF
Fun with WooCommerce
PDF
Managed WordPress Hosting
PDF
Having Fun with Local WordPress Development
PDF
Share Your WordPress Developer Tools
How to Conduct an SEO Audit
WordPress Membership Plugins: WP-Members
WordPress Membership Plugins: MemberPress
How to Develop a Color Palette for Your Website with Amanada McCoy
Event Management Plugins for WordPress
Beyond Gravity Forms: Form Plugins for WordPress
Advanced Custom Fields: Amazing Possibilities and Irritating Limitations
March 2015: Plugins Worth Paying For
Google Webmaster Tools for WordPress
Introduction to Google Analytics by Katherine Mancuso
iThemes Exchange: the New Kid on the WordPress E-Commerce Block
Running a WordPress Business--Some Numbers
What Developers Need Designers to Know about WordPress
Making WordPress Fly
Drag-and-drop WordPress Themes, featuring Themify Builder
Drag and-Drop WordPress Themes
Fun with WooCommerce
Managed WordPress Hosting
Having Fun with Local WordPress Development
Share Your WordPress Developer Tools

Recently uploaded (20)

PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
innovation process that make everything different.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PPTX
Introduction to Information and Communication Technology
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PDF
Testing WebRTC applications at scale.pdf
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
Slides PPTX World Game (s) Eco Economic Epochs.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PPTX
Digital Literacy And Online Safety on internet
PPTX
Internet___Basics___Styled_ presentation
PPTX
artificial intelligence overview of it and more
PDF
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
innovation process that make everything different.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
Triggering QUIC, presented by Geoff Huston at IETF 123
Introuction about ICD -10 and ICD-11 PPT.pptx
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
SASE Traffic Flow - ZTNA Connector-1.pdf
Introduction to Information and Communication Technology
WebRTC in SignalWire - troubleshooting media negotiation
Testing WebRTC applications at scale.pdf
The New Creative Director: How AI Tools for Social Media Content Creation Are...
Introuction about WHO-FIC in ICD-10.pptx
Slides PPTX World Game (s) Eco Economic Epochs.pptx
Paper PDF World Game (s) Great Redesign.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
Digital Literacy And Online Safety on internet
Internet___Basics___Styled_ presentation
artificial intelligence overview of it and more
APNIC Update, presented at PHNOG 2025 by Shane Hermoso
An introduction to the IFRS (ISSB) Stndards.pdf

Git Version Control for the Complete N00b by Adam LaBarge

  • 2. What is Git? What is version control? Version Control: Version control is a system that records changes to a file/s over time so that you can recall specific versions later. GIT: Git is version control software developed by Linus Torvalds aimed at being faster, distributed and focused on data. - snapshots of data over time (states) - nearly every operation is local - integrity with checksums - git generally only adds data
  • 3. Git files states. “Now pay attention” The 3 states of a file. COMMITTED: Data has been safely stored into the local database. MODIFIED: File/s have changed, but they are not yet safely stored. (committed) STAGED: File/s have been marked for commit.
  • 4. WHY USE IT? - Easier than making your own version control system in your file system with new folders and different copies of this and that. - Better history and operations structure. - Remote repositories allow for data integrity and backup of files. - Working in a team in a manageable way. - True me, the day will come when you are very thankful you are using it.
  • 5. HOW TO INSTALL Git is a command line application. There is no GUI app by default. Mac: download the install app and proceed Windows: download ‘git for windows’ app and proceed Linux: command line install
  • 6. PICK A GUI APP (HTTPS://GIT-SCM.COM/DOWNLOADS/GUIS)
  • 7. DO I NEED GIT REPOSITORY HOSTING SERVICE Technically, no. But yes, you really do! What is it? - a place to externally house your file/s changes - manage access to code base - wikis and other services (error checking, QA testing, etc) Options: - GitHub. - GitLab Account Types: - BitBucket - Heroku Free vs. Private
  • 8. GIT COMMANDS Commit – saving code changes to the database Push – pushing committed code to a repository Pull – pulling committed code from a repository & merging Fetch – pulling committed code from a repository Branch/Fork – splitting the code base into a new version Merge – combining two versions of code Revert – going back to a previous history stage Checkout/Reset – setting a file/s back to the committed state in the repo Conflict – when Git does not know how to auto merge code
  • 9. USING GIT Create a .gitignore file (file/s we don’t want in the repository) Create a Git instance - Export the /.git directory - config Add remote repository Add files to commit Commit files Push to remote repository Now lets make changes, forks, commits
  • 11. USING GIT IN DEPLOYMENT SSH – command line git on your stage and production servers (preferred method) Hosting companies own versions. - WP-Engine - ssh keys, pushing from command line, error testing code - Pantheon - similar but everything is controlled via their GUI Positives & Negatives: - in some ways it is easier – docs have been written, someone else thinking for you - when changes are made directly to server, is a PITA to get it into the repository
  • 12. WAYS TO MAKE GIT EASY - Always try to move forward - Try never to revert (the revert work around with GitHub downloads) - Don’t be scared to make mistakes - If in doubt, copy everything out, start again - Learn your host repository interface, they are there to help - Write logical commit messages - $ git status - $ git checkout –b {branch} - $ git pull origin {branch}
  • 13. OH SNAP! NOW WHAT Google and tutorials - stackoverflow.com has many great answers - http://rogerdudler.github.io/git-guide/ - https://git-scm.com/about