Intro
About Dave
● Co-Founder & CTO at Bloc
● Programmer since childhood
● Bloc, Kontagent/Upsight, Djangy
About Bloc
● Immersive, online mentorship courses in web dev, mobile dev, design
About Git
● Git is an extraordinarily powerful tool
● This is a brief intro!
Agenda
We will cover:
1. What is Version Control?
a. Why should you care?
b. Historical context
c. Why you should use it
2. Git terminology + basics (w/ Demo)
3. GitHub
4. Collaborating on GitHub: branches and pull requests
5. Publishing from git directly into Heroku (w/ Demo)
6. Advanced features
7. Q&A
Version Control
● Changes
○ Record changes
○ Attribute changes
○ “Apply changes”
● Change should be something we model and care about
History
● The dark times (no version control)
○ email source files around
○ keeping track of changes difficult, if not impossible
○ messy (June 5 Version 5 revised v2 v3 REVISED AGAIN filenames)
History
● Diffs and patches
● Make a copy every time you change something
● diff = file containing difference between your new copy and the original
● patch = replay the diff on someone else’s original to produce your
changes
History
● CVS (Concurrent Versions System) - 1990
○ Central repository
● SVN (Subversion) - 2000
○ Central repository
● Git - 2005
○ Built by Linus Torvalds for the linux kernel
○ Distributed
● Hg (Mercurial, very similar to git)
Basics
● Commit
○ Set of changes to one or more files
● Branch
○ A collection of commits in a certain order
○ Main branch is called “master”
○ Branches for all sorts of things
■ New features
■ bug fixes
■ copy changes
■ releases
○ Branches are “merged”
● Repository = set of branches
Demo
Basics
GitHub
GitHub
Collaborating
● Push/Pull
● Branching
● Pull Requests
Branches and Pull Requests
Heroku
● Before heroku
○ purchase virtual server (or physical server)
○ configure application server software
○ configure reverse proxy (apache / nginx)
○ configure databases, caches, permissions, other services
● After heroku
○ git push heroku master
○ heroku addons:add heroku-postgresql
Heroku
Heroku demo
Questions?
Advanced
● Stashing
● Rewriting history (Merging vs. Rebasing)
● Squashing commits (Interactive Rebase)
● Reflog

Do You Get Git?

  • 2.
    Intro About Dave ● Co-Founder& CTO at Bloc ● Programmer since childhood ● Bloc, Kontagent/Upsight, Djangy About Bloc ● Immersive, online mentorship courses in web dev, mobile dev, design About Git ● Git is an extraordinarily powerful tool ● This is a brief intro!
  • 3.
    Agenda We will cover: 1.What is Version Control? a. Why should you care? b. Historical context c. Why you should use it 2. Git terminology + basics (w/ Demo) 3. GitHub 4. Collaborating on GitHub: branches and pull requests 5. Publishing from git directly into Heroku (w/ Demo) 6. Advanced features 7. Q&A
  • 4.
    Version Control ● Changes ○Record changes ○ Attribute changes ○ “Apply changes” ● Change should be something we model and care about
  • 5.
    History ● The darktimes (no version control) ○ email source files around ○ keeping track of changes difficult, if not impossible ○ messy (June 5 Version 5 revised v2 v3 REVISED AGAIN filenames)
  • 6.
    History ● Diffs andpatches ● Make a copy every time you change something ● diff = file containing difference between your new copy and the original ● patch = replay the diff on someone else’s original to produce your changes
  • 7.
    History ● CVS (ConcurrentVersions System) - 1990 ○ Central repository ● SVN (Subversion) - 2000 ○ Central repository ● Git - 2005 ○ Built by Linus Torvalds for the linux kernel ○ Distributed ● Hg (Mercurial, very similar to git)
  • 8.
    Basics ● Commit ○ Setof changes to one or more files ● Branch ○ A collection of commits in a certain order ○ Main branch is called “master” ○ Branches for all sorts of things ■ New features ■ bug fixes ■ copy changes ■ releases ○ Branches are “merged” ● Repository = set of branches
  • 9.
  • 10.
  • 12.
  • 13.
  • 14.
    Collaborating ● Push/Pull ● Branching ●Pull Requests Branches and Pull Requests
  • 15.
    Heroku ● Before heroku ○purchase virtual server (or physical server) ○ configure application server software ○ configure reverse proxy (apache / nginx) ○ configure databases, caches, permissions, other services ● After heroku ○ git push heroku master ○ heroku addons:add heroku-postgresql
  • 16.
  • 17.
  • 18.
  • 19.
    Advanced ● Stashing ● Rewritinghistory (Merging vs. Rebasing) ● Squashing commits (Interactive Rebase) ● Reflog