do you get git?
Post on 27-Jun-2015
1.132 Views
Preview:
DESCRIPTION
TRANSCRIPT
IntroAbout 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!
AgendaWe will cover:
1. What is Version Control?a. Why should you care?b. Historical contextc. Why you should use it
2. Git terminology + basics (w/ Demo)3. GitHub4. Collaborating on GitHub: branches and pull requests5. Publishing from git directly into Heroku (w/ Demo)6. Advanced features7. 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
top related