gi git t fu fund ndam amen enta tals ls
play

Gi Git t Fu Fund ndam amen enta tals ls Open up a world of - PowerPoint PPT Presentation

Gi Git t Fu Fund ndam amen enta tals ls Open up a world of community and collaboration Paul Broadwith @pauby https://blog.pauby.com Who Am I? Paul Broadwith, Glasgow, Scotland 25+ years in defence, government, financial


  1. Gi Git t Fu Fund ndam amen enta tals ls Open up a world of community and collaboration Paul Broadwith @pauby https://blog.pauby.com

  2. Who Am I? Paul Broadwith, Glasgow, Scotland • 25+ years in defence, government, financial • sectors Lead Engineer on Boxstarter and Chocolatey • cChoco DSC Resource

  3. Qu Questio ions A At Th The En End? d?

  4. In This Session • What actually is Git? • What tools do I need for Git? • Who is using Git and why do I need to use it? • How does Git work? • Git commands you need to know! • What is a Pull Request and what they are used for; • How to work with Open Source projects using Git;

  5. Who Is This Aimed At? Level 100

  6. is not GitHub Git

  7. What at Is Is G Git it?

  8. What Is Git? Wikipedia defines Git as: Gi Git is a vers rsion ion cont ntro rol l system for r tra racking ing cha hang nges es in n comput puter er file les s and coordinating work on those files among multiple people. It is primarily used for source code management in software development, but it can be used to keep track of changes in any set of files. As a distributed revision control system it is aimed med at spe peed, d, data int ntegrit grity, and support for distributed, non-linear workflows. • https://en.wikipedia.org/wiki/Git

  9. What Is Git? Which means Git is: Git t is a version sion cont ntrol ol sys ystem tem for tracking king cha hang nges es in co n compu puter ter files. es. It It is aimed ed at spe peed ed and nd da data int ntegrity. egrity.

  10. What Is Git? Wikipedia defines Version Control System as: … vers rsion ion cont ntro rol l is the he ma mana nage gement ment of cha hang nges s to docume uments nts, , comput puter er pro rograms, rams, larg rge e web sites, , and nd othe her r coll llecti ction ons s of inf nfor ormat mation ion. . Cha hang nges es are re us usua ually ly identi ntifie fied d by a num number r or r letter r code, term rmed the he "revision number“ … Each revision is associated with a a time mestamp tamp and nd the he pe pers rson on making ing the he cha hang nge. . Revisio evisions ns can n be compare pared, d, re restored, red, and nd with h some types of file les, s, merg rged. d. • https://en.wikipedia.org/wiki/Version_contro

  11. What Is Git? Which means a version control system is: Vers rsion ion cont ntrol rol is the he mana nagement gement of cha hang nges es to collectio lections ns of inf nformation. rmation. Cha hang nges es are ide dentified ntified by by a nu numbe ber r associated ciated with th a tim imestamp estamp and nd the he pe person son maki king ng the he cha hang nge. e.

  12. What Tools Do I Need?

  13. Recommended Software ht https://c ps://chocolat hocolatey.org ey.org ht https://c ps://chocolat hocolatey.org/in ey.org/install stall

  14. Required Tools Gi Git To t Tools ls ht https://g ps://gitforwindows itforwindows.org/ .org/ > choco install git -y https://git-scm.com/download/mac > apt install git-all

  15. Recommended Tools posh-git GitHub Pull Requests Gi Git Ext t Exten ensions ions PSGit Gi Git Cr t Cred edential ential Man anager ager Fo For r Wi Windows ows

  16. Who uses Git?

  17. Companies & Projects You Know

  18. Git Providers & Software

  19. Microsoft Windows & GVFS 1760 Windows Builds (per Windows Bui lds (per day) day) 4352 Active B Active Branches ranches 2500 Pull R Pull Requests (p equests (per day) er day) 8421 Code Pushes (per Code Pushes (per day) day) As at May 2017 (Using GVFS) https://blogs.msdn.microsoft.com/bharry/2017/05/24/the-largest-git-repo-on-the-planet/

  20. DSCResources Repository Statistics 475 Pull Requests 300 Closed Issues Since 1 January 2018 https://blogs.msdn.microsoft.com/powershell/2018/09/13/desired-state-configuration-dsc-planning-update-september-2018/

  21. Who Uses Git? Developers, Coders CI / CD, & Scripters Runbooks, Cookbooks Websites Writers

  22. Why Do I Need To Use Git?

  23. If you write code … … you are a developer

  24. 2017 GitHub Use 1 B 1 Bil illio lion n Commi mmits ts 47 Mil illion lion Pu Pull ll Re Requests ests 25.3 3 Mil illion lion Acti tive ve Re Reposi sito tories ries 24 Mil illion lion Dev evelope elopers rs https://octoverse.github.com/

  25. Git Has Your Back Change History CI / CD Undo Collaborate Mistakes Open Source

  26. Even n Th The Beards rds Use It It

  27. How Does Git Work? The 3 Stages Of Git

  28. 8 Essential Git Commands ? clo lone ne sta tatu tus pull ll + add ad commit mmit chec eckou out push re remo mote te

  29. The 3 Stages > git add > git commit <. | FILES> –m ‘Message’ > git status Stage Commit Change changed changes source files files Sta tage ged Committ Co tted Unsta tage ged

  30. The 5 Fundamental Building Blocks Of Git repository pository fork * br branc nches hes pu pull ll requests quests commit mit

  31. What Is A Repository? Repository / Repo – terminology - both used Just a folder where you store your project files myproj

  32. How Do Branches Work? fix-memory-leak branch update-doc branch dev branch master branch

  33. What Is A Commit? > git commit –m ‘Message’ When one or more changes Commit have been applied to a branch, changes its called a … commit mmit Co Committ tted

  34. What Is A Fork? cool-project fork repository link my/cool-project cool-project Forking a repo is simply creating a linked copy of that repository. The link allows changes to be pulled or pushed to the original repository.

  35. What Is A Pull Request? update-doc branch master branch Lets others know about Allows review and a change you have discussion around those made. changes.

  36. Essential Git Commands

  37. DEMO Our First Pull Request

  38. Git Cycle > git pull > git add . > git push > git commit – m “Initial commit” Pu Pull ll Pu Push Commit mit

  39. Pull Request Flow dev branch created dev branch from master merged to master master branch > git add . > git checkout – b dev > git commit –m “ msg ” > git push review changes commit code submit pull request

  40. Summary • We learned what Git is and where it came from; • What tools are needed to work with Git; • Who is using Git and why I need to use it! • Fundamental Git commands; • The three stages of Git; • What a pull request is, why we use them and how to use it to work with Open Source projects;

  41. Congratulations! You’re now a git ! git

  42. Questions?

  43. Speaker Scholarship bit.ly/ds- speaker Inclusion – Diversity – Community DATA:Scotland

  44. Thank You! pauby.com @pauby github.com/pauby linkedin.com/in/paulbroadwith Paul Broadwith pau.by/talks

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend