Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels...
Transcript of Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels...
![Page 1: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/1.jpg)
Best Practices & Tips using Git
Randy Pagels
Azure Specialist - Application Development
US Great Lakes Region
![Page 2: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/2.jpg)
Unlimited private Git repo hosting and support for
TFVC that scales from a hobby project to the
world’s largest Git repositories
Azure Repos
https://azure.com/devops➔
Works with your Git clientSecurely connect with and push code into your Git repos from any IDE, editor, or Git client.
Web hooks and API integrationAdd validations and extensions from the marketplace or build your own using web hooks and REST APIs.
Semantic code searchQuickly find what you’re looking for with code-aware search that understands classes and variables.
![Page 3: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/3.jpg)
1.1B in 2018
33M
100M
5M vulnerability alerts in 2018
![Page 4: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/4.jpg)
Home to the most
important and popular
open source projects
on the planet
![Page 5: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/5.jpg)
![Page 6: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/6.jpg)
![Page 7: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/7.jpg)
![Page 8: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/8.jpg)
![Page 9: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/9.jpg)
▪
▪
![Page 10: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/10.jpg)
![Page 11: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/11.jpg)
![Page 12: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/12.jpg)
![Page 13: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/13.jpg)
![Page 14: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/14.jpg)
refs/pull/*/head refs/remotes/origin/pr/*'
refs/pull/*/merge refs/remotes/origin/pr/*'
![Page 15: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/15.jpg)
![Page 16: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/16.jpg)
Azure Pipelines
Microsoft Security Code Analysis
![Page 17: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/17.jpg)
Sonarqube IntegrationAnalyze the quality of your source code to detect bugs, vulnerabilities and code smells throughout the
development process.
![Page 18: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/18.jpg)
The Microsoft Security Code Analysis extension easily integrating the running of static analysis tools
in your Azure DevOps pipelines.
Simple Configuration and Execution
✓ Adding security static analysis tools to your build is as simple as
adding new build tasks.
✓ The tasks run as part of your DevOps pipeline and produce logs with
results of any findings.
Keep Your Builds Clean
✓ Configure the extension to introduce a build break should any new
issues being introduced and detected.
✓ Configure continuous integration builds, to run on every pull request.
Auto-Update
✓ The Azure DevOps build tasks and tools can be set to stay up-to-date.
✓ If there is an updated version of the tool, there is no need to download
and install it; this extension takes care of that for you.
https://secdevtools.azurewebsites.net/
![Page 19: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/19.jpg)
SourceManage your open source usage and security in your pipeline
Detection
✓ Automatically detect all open
source components in your code,
while running your build
Selection
✓ Discover the best open source
components for your needs, while
you search online
Alerting
✓ Get real time alerts on security
risks, policy pitfalls, and software
bugs
Reporting
✓ Generate comprehensive, always
up to date reports on your open
source usage, in one click
![Page 20: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/20.jpg)
![Page 21: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/21.jpg)
blob d65b79a... image.png 83MB
commit 03ce18e...
commit 69a846f...
blob af5626b... image.png 78MB
commit 7fbc67a...
blob 43e6ac7... image.png 75MB
commit 12177ab...
blob 0819cba... image.png 68MB
![Page 22: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/22.jpg)
blob d65b79a... image.png 83MB
commit 03ce18e...
commit 69a846f...
blob af5626b... image.png 78MB
commit 7fbc67a...
blob 43e6ac7... image.png 75MB
commit 12177ab...
blob 0819cba... image.png 68MB
![Page 23: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/23.jpg)
blob d65b79a... image.png 128B
commit 03ce18e...
commit 69a846f...
blob af5626b... image.png 128B
commit 7fbc67a...
blob 43e6ac7... image.png 128MB
commit 12177ab...
blob 0819cba... image.png 128B
![Page 24: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/24.jpg)
![Page 25: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/25.jpg)
▪
▪
▪
![Page 26: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/26.jpg)
![Page 27: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/27.jpg)
Organizations tend to produce branching structures that copy the organization chart.
![Page 28: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/28.jpg)
Old way - Composing Isolation Mechanisms
Fixes Hotfixes
Release Service Pack
MainIntegration
Team A
Team B
Team C
Feature 1
Feature 2
Release
![Page 29: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/29.jpg)
Trunk-Based Branching Strategy
master
bugfix
feature
topic
topic
topic
topic
topic
![Page 30: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/30.jpg)
Github Flow & Release Flow
master
bugfix
feature
topic
topic
topic
topic
topic
Release v.120
Release v.121
![Page 31: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/31.jpg)
Ways to improve trunk-based development
• Develop in small batches and commit often.
• Perform synchronous code review.
• Implement comprehensive automated testing.
• Have a fast build.
• Create a core group of advocates and mentors.
• Release from Master.
![Page 32: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/32.jpg)
![Page 33: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/33.jpg)
![Page 34: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/34.jpg)
![Page 35: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/35.jpg)
![Page 36: Best Practices & Tips using Git · 2019. 10. 1. · Best Practices & Tips using Git Randy Pagels Azure Specialist - Application Development US Great Lakes ... Works with your Git](https://reader036.fdocuments.net/reader036/viewer/2022063019/5fe013c89ce3704fe56d13b9/html5/thumbnails/36.jpg)