SlideShare una empresa de Scribd logo
1 de 34
#CLUS
Ashley Roach
Principal Engineer Evangelist
DEVNET-1080
Introduction to Git
Agenda
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
• Introduction
• Quick overview of Git
• Workshop
• Resources
3DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
WHY AREWE HERE?
It’s kindof like:
- Snapshots ofVMs
- Incremental backups of files
- Wiki versioning
When you make a mistake or want to
do some experimenting, you can do that in
a safe way
5DEVNET-1080
Why version control?To
Protect yourself and
others
What does this have to do
with Networking or Data
Center?
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
NetDevOps CICD Pipeline Demonstration
Create Proposed Branch Update Configuration Test Configuration Push Proposed Changes
Build Automation StartsBuild Test NetworkDeploy Changes and
Test
Send
Notification
Automated Pipeline Credit: Hank Preston
DEVNET-1080 8DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Git vs. GitHub
Git is an open source
distributed version control
system / technology
GitHub is a commercial
company, that runs
GitHub.com based on Git
VCS
9DEVNET-1080
Git:TechnicalOverview
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
DISTRIBUTED VERSION CONTROL
• Opens up to new workflows: git flow
• Each system has an exact replica of the repo as other collaborators.
https://git-scm.com/images/about/workflow-b@2x.png
11DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Under the hood
• Changes are stored in trees
• Trees contain changed files
• Commits contain trees
http://git-scm.com/figures/18333fig0903-tn.png
12DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Getting Started with Git Starting from GitHub (screenshot flow of new project)
Starting from your workstation (git init)
13DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Getting Started with CLI: GIT CONFIG
• So you can be held accountable, configure git
$ git config --global user.name "Your Name Comes Here"
$ git config --global user.email you@yourdomain.example.com
14DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Getting Started: Cloning Projects
• No password
• Set up SSH key on remote server (e.g. ssh-keygen)
$ git clone git@github.com:aroach/upgraded-guacamole.git
$ git clone https://github.com/aroach/upgraded-guacamole.git
15DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Getting Started: Local Repository
16DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
What’s inside .git?
17DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 19DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
GIT ADD
• Add any files in your repository to git “stage”
$ git add .
https://git-scm.com/images/about/index1@2x.png
21DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
STAGING AREA
Hat tip: @GeorgiaReh
22DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
GIT COMMIT
• Store your changes into a commit
• Saves all of your changes together / save point
• Commit does NOT push
$ git commit –m ’Initial commit’
23DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Git Log: History of commits
24DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
BRANCHING:Your safe place
• Makes a pointer to your
code
• Moves HEAD around
http://git-scm.com/figures/18333fig0307-tn.png
$ git branch <name>
$ git branch testing
$ git commit –m “new”
$ git checkout master
25DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
MERGING
• git merge <topic>
• You must be on the branch you want to merge INTO when you execute this
command (e.g. master)
$ git merge <branch>
26DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
GOING BACKWARDS
• Generate a new commit that undoes all of the changes introduced in
<commit>, then apply it to the current branch.
$ git revert <commit>
27DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
SHAREYOUR CHANGES
• git push <destination> <branch>
• git push origin master
$ git remote add <name> <url>
$ git push <name> <branch>
$ git push origin master
28DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
GIT CLIENTS
• CLI Client
• IDE Clients
• VIM: airblade/vim-gitgutter
• Emacs: magit
• GUI Clients
• SourceTree
• Git Kracken
29DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 32DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 33DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Come find me after today… I’ll be waiting
Ashley Roach
• asroach@cisco.com
• @aroach
• http://github.com/aroach
• http://linkedin.com/in/ashleyroach
Cisco DEVNET
• @CiscoDevNet
• http://github.com/CiscoDevNet
34DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco WebexTeams
Questions?
Use Cisco Webex Teams (formerly Cisco Spark)
to chat with the speaker after the session
Find this session in the Cisco Live Mobile App
Click “Join the Discussion”
Install Webex Teams or go directly to the team space
Enter messages/questions in the team space
How
Webex Teams will be moderated
by the speaker until June 18, 2018.
cs.co/ciscolivebot# DEVNET-1080
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
1
2
3
4
35
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Complete your online session evaluation
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Give us your feedback to be entered into a
Daily Survey Drawing.
Complete your session surveys through the
Cisco Live mobile app or on
www.CiscoLive.com/us.
Don’t forget: Cisco Live sessions will be available for viewing on
demand after the event at www.CiscoLive.com/Online.
36Presentation ID
© 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Demos in
the Cisco
campus
Walk-in
self-paced
labs
Meet the
engineer
1:1
meetings
Related
sessions
Continue
your
education
Presentation ID 37
Thank you
#CLUS 38Presentation ID
#CLUS

Más contenido relacionado

La actualidad más candente

Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244Cisco DevNet
 
Diffy gets enterprise grade
Diffy gets enterprise gradeDiffy gets enterprise grade
Diffy gets enterprise gradeEryk Szymanski
 
Buildpacks detect, compile, release
Buildpacks  detect, compile, releaseBuildpacks  detect, compile, release
Buildpacks detect, compile, releaseHristo Iliev
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyWeaveworks
 
How to Get Started With NGINX
How to Get Started With NGINXHow to Get Started With NGINX
How to Get Started With NGINXNGINX, Inc.
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...NGINX, Inc.
 
Workshop Azure DevOps Repos
Workshop Azure DevOps ReposWorkshop Azure DevOps Repos
Workshop Azure DevOps ReposNorberto Enomoto
 
Production ready kubernetes
Production ready kubernetesProduction ready kubernetes
Production ready kubernetesArnaud MAZIN
 
NGINX DevSecOps Workshop
NGINX DevSecOps WorkshopNGINX DevSecOps Workshop
NGINX DevSecOps WorkshopNGINX, Inc.
 
NGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices WorkshopNGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices WorkshopNGINX, Inc.
 
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Roberto Pérez Alcolea
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOpsBrice Fernandes
 
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINX
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINXNGINX 101: Web Traffic Encryption with SSL/TLS and NGINX
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINXNGINX, Inc.
 
Building a Django App on Heroku
Building a Django App on HerokuBuilding a Django App on Heroku
Building a Django App on HerokuJoe Fusaro
 
Orchestrate Continuous Delivery with Jenkins and Docker
Orchestrate Continuous Delivery with Jenkins and DockerOrchestrate Continuous Delivery with Jenkins and Docker
Orchestrate Continuous Delivery with Jenkins and DockerNicolas De Loof
 

La actualidad más candente (20)

Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
Advanced coding & deployment for Cisco Video Devices - CL20B - DEVNET-3244
 
Diffy gets enterprise grade
Diffy gets enterprise gradeDiffy gets enterprise grade
Diffy gets enterprise grade
 
Buildpacks detect, compile, release
Buildpacks  detect, compile, releaseBuildpacks  detect, compile, release
Buildpacks detect, compile, release
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
How to Get Started With NGINX
How to Get Started With NGINXHow to Get Started With NGINX
How to Get Started With NGINX
 
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
Session: A Reference Architecture for Running Modern APIs with NGINX Unit and...
 
Workshop Azure DevOps Repos
Workshop Azure DevOps ReposWorkshop Azure DevOps Repos
Workshop Azure DevOps Repos
 
Production ready kubernetes
Production ready kubernetesProduction ready kubernetes
Production ready kubernetes
 
NGINX DevSecOps Workshop
NGINX DevSecOps WorkshopNGINX DevSecOps Workshop
NGINX DevSecOps Workshop
 
NGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices WorkshopNGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices Workshop
 
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Meetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOpsMeetup 23 - 03 - Application Delivery on K8S with GitOps
Meetup 23 - 03 - Application Delivery on K8S with GitOps
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOps
 
Wordpress vs JamStack
Wordpress vs JamStackWordpress vs JamStack
Wordpress vs JamStack
 
GitOps w/argocd
GitOps w/argocdGitOps w/argocd
GitOps w/argocd
 
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINX
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINXNGINX 101: Web Traffic Encryption with SSL/TLS and NGINX
NGINX 101: Web Traffic Encryption with SSL/TLS and NGINX
 
Building a Django App on Heroku
Building a Django App on HerokuBuilding a Django App on Heroku
Building a Django App on Heroku
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
 
Orchestrate Continuous Delivery with Jenkins and Docker
Orchestrate Continuous Delivery with Jenkins and DockerOrchestrate Continuous Delivery with Jenkins and Docker
Orchestrate Continuous Delivery with Jenkins and Docker
 

Similar a Intro to Git Devnet-1080 Cisco Live 2018

Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Cisco DevNet
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Cisco DevNet
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Codemotion
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Codemotion
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWebinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWeaveworks
 
Meeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listeningMeeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listeningCisco DevNet
 
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018Amazon Web Services
 
Why Automate the Network?
Why Automate the Network?Why Automate the Network?
Why Automate the Network?Hank Preston
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Cisco DevNet
 
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071Cisco DevNet
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentialsjazoon13
 
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896Cisco DevNet
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Cisco DevNet
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and GithubWycliff1
 
カエルと実践する CI/CD CI 編
カエルと実践する CI/CD CI 編カエルと実践する CI/CD CI 編
カエルと実践する CI/CD CI 編Tsuyoshi Miyake
 
Brksec 2048-demystifying aci-security
Brksec 2048-demystifying aci-securityBrksec 2048-demystifying aci-security
Brksec 2048-demystifying aci-securityCisco
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubScott Graham
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeTeerapat Khunpech
 

Similar a Intro to Git Devnet-1080 Cisco Live 2018 (20)

Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019
 
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
Golang 101 for IT-Pros - Cisco Live Orlando 2018 - DEVNET-1808
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
 
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
Stève Sfartz - Meeting rooms are talking! Are you listening? - Codemotion Ber...
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOpsWebinar: End to End Security & Operations with Chainguard and Weave GitOps
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
 
Meeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listeningMeeting rooms are talking. Are you listening
Meeting rooms are talking. Are you listening
 
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
Container Power Hour with Jess, Clare, and Abby (CON362) - AWS re:Invent 2018
 
Why Automate the Network?
Why Automate the Network?Why Automate the Network?
Why Automate the Network?
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
 
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
Customizing Cisco Collaboration Devices - CL20B - DEVNET-2071
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -EssentialsJAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
JAZOON'13 - Thomas Hug & Bartosz Majsak - Git Workshop -Essentials
 
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
Chatbots 101: design, code, deploy - Cisco Live Orlando 2018 - DEVNET-2896
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
 
Introduction to git and Github
Introduction to git and GithubIntroduction to git and Github
Introduction to git and Github
 
カエルと実践する CI/CD CI 編
カエルと実践する CI/CD CI 編カエルと実践する CI/CD CI 編
カエルと実践する CI/CD CI 編
 
Brksec 2048-demystifying aci-security
Brksec 2048-demystifying aci-securityBrksec 2048-demystifying aci-security
Brksec 2048-demystifying aci-security
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Intro to Git Devnet-1080 Cisco Live 2018

  • 2. Ashley Roach Principal Engineer Evangelist DEVNET-1080 Introduction to Git
  • 3. Agenda © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS • Introduction • Quick overview of Git • Workshop • Resources 3DEVNET-1080
  • 4. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS WHY AREWE HERE? It’s kindof like: - Snapshots ofVMs - Incremental backups of files - Wiki versioning When you make a mistake or want to do some experimenting, you can do that in a safe way 5DEVNET-1080
  • 5. Why version control?To Protect yourself and others
  • 6. What does this have to do with Networking or Data Center?
  • 7. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS NetDevOps CICD Pipeline Demonstration Create Proposed Branch Update Configuration Test Configuration Push Proposed Changes Build Automation StartsBuild Test NetworkDeploy Changes and Test Send Notification Automated Pipeline Credit: Hank Preston DEVNET-1080 8DEVNET-1080
  • 8. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Git vs. GitHub Git is an open source distributed version control system / technology GitHub is a commercial company, that runs GitHub.com based on Git VCS 9DEVNET-1080
  • 10. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS DISTRIBUTED VERSION CONTROL • Opens up to new workflows: git flow • Each system has an exact replica of the repo as other collaborators. https://git-scm.com/images/about/workflow-b@2x.png 11DEVNET-1080
  • 11. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Under the hood • Changes are stored in trees • Trees contain changed files • Commits contain trees http://git-scm.com/figures/18333fig0903-tn.png 12DEVNET-1080
  • 12. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Getting Started with Git Starting from GitHub (screenshot flow of new project) Starting from your workstation (git init) 13DEVNET-1080
  • 13. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Getting Started with CLI: GIT CONFIG • So you can be held accountable, configure git $ git config --global user.name "Your Name Comes Here" $ git config --global user.email you@yourdomain.example.com 14DEVNET-1080
  • 14. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Getting Started: Cloning Projects • No password • Set up SSH key on remote server (e.g. ssh-keygen) $ git clone git@github.com:aroach/upgraded-guacamole.git $ git clone https://github.com/aroach/upgraded-guacamole.git 15DEVNET-1080
  • 15. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Getting Started: Local Repository 16DEVNET-1080
  • 16. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS What’s inside .git? 17DEVNET-1080
  • 17. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 19DEVNET-1080
  • 18. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS GIT ADD • Add any files in your repository to git “stage” $ git add . https://git-scm.com/images/about/index1@2x.png 21DEVNET-1080
  • 19. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS STAGING AREA Hat tip: @GeorgiaReh 22DEVNET-1080
  • 20. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS GIT COMMIT • Store your changes into a commit • Saves all of your changes together / save point • Commit does NOT push $ git commit –m ’Initial commit’ 23DEVNET-1080
  • 21. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Git Log: History of commits 24DEVNET-1080
  • 22. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS BRANCHING:Your safe place • Makes a pointer to your code • Moves HEAD around http://git-scm.com/figures/18333fig0307-tn.png $ git branch <name> $ git branch testing $ git commit –m “new” $ git checkout master 25DEVNET-1080
  • 23. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS MERGING • git merge <topic> • You must be on the branch you want to merge INTO when you execute this command (e.g. master) $ git merge <branch> 26DEVNET-1080
  • 24. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS GOING BACKWARDS • Generate a new commit that undoes all of the changes introduced in <commit>, then apply it to the current branch. $ git revert <commit> 27DEVNET-1080
  • 25. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS SHAREYOUR CHANGES • git push <destination> <branch> • git push origin master $ git remote add <name> <url> $ git push <name> <branch> $ git push origin master 28DEVNET-1080
  • 26. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS GIT CLIENTS • CLI Client • IDE Clients • VIM: airblade/vim-gitgutter • Emacs: magit • GUI Clients • SourceTree • Git Kracken 29DEVNET-1080
  • 27. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 32DEVNET-1080
  • 28. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 33DEVNET-1080
  • 29. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Come find me after today… I’ll be waiting Ashley Roach • asroach@cisco.com • @aroach • http://github.com/aroach • http://linkedin.com/in/ashleyroach Cisco DEVNET • @CiscoDevNet • http://github.com/CiscoDevNet 34DEVNET-1080
  • 30. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Cisco WebexTeams Questions? Use Cisco Webex Teams (formerly Cisco Spark) to chat with the speaker after the session Find this session in the Cisco Live Mobile App Click “Join the Discussion” Install Webex Teams or go directly to the team space Enter messages/questions in the team space How Webex Teams will be moderated by the speaker until June 18, 2018. cs.co/ciscolivebot# DEVNET-1080 © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 35 1 2 3 4 35
  • 31. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Complete your online session evaluation © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Give us your feedback to be entered into a Daily Survey Drawing. Complete your session surveys through the Cisco Live mobile app or on www.CiscoLive.com/us. Don’t forget: Cisco Live sessions will be available for viewing on demand after the event at www.CiscoLive.com/Online. 36Presentation ID
  • 32. © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS © 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS Demos in the Cisco campus Walk-in self-paced labs Meet the engineer 1:1 meetings Related sessions Continue your education Presentation ID 37
  • 34. #CLUS