Do You Get Git?
-
Upload
prasid-pathak -
Category
Engineering
-
view
1.133 -
download
0
description
Transcript of Do You Get Git?
![Page 1: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/1.jpg)
![Page 2: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/2.jpg)
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!
![Page 3: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/3.jpg)
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
![Page 4: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/4.jpg)
Version Control
● Changes○ Record changes○ Attribute changes○ “Apply changes”
● Change should be something we model and care about
![Page 5: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/5.jpg)
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)
![Page 6: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/6.jpg)
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
![Page 7: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/7.jpg)
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)
![Page 8: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/8.jpg)
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
![Page 9: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/9.jpg)
Demo
![Page 10: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/10.jpg)
Basics
![Page 11: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/11.jpg)
![Page 12: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/12.jpg)
GitHub
![Page 13: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/13.jpg)
GitHub
![Page 14: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/14.jpg)
Collaborating
● Push/Pull● Branching● Pull Requests
Branches and Pull Requests
![Page 15: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/15.jpg)
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
![Page 16: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/16.jpg)
Heroku
![Page 17: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/17.jpg)
Heroku demo
![Page 18: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/18.jpg)
Questions?
![Page 19: Do You Get Git?](https://reader034.fdocuments.in/reader034/viewer/2022052507/558de5c81a28abf9428b4756/html5/thumbnails/19.jpg)
Advanced
● Stashing● Rewriting history (Merging vs. Rebasing)● Squashing commits (Interactive Rebase)● Reflog