SlideShare a Scribd company logo
#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

More Related Content

What's hot

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
Cisco DevNet
 
Diffy gets enterprise grade
Diffy gets enterprise gradeDiffy gets enterprise grade
Diffy gets enterprise grade
Eryk Szymanski
 
Buildpacks detect, compile, release
Buildpacks  detect, compile, releaseBuildpacks  detect, compile, release
Buildpacks detect, compile, release
Hristo 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 Rigby
Weaveworks
 
How to Get Started With NGINX
How to Get Started With NGINXHow to Get Started With NGINX
How to Get Started With NGINX
NGINX, 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 Repos
Norberto Enomoto
 
Production ready kubernetes
Production ready kubernetesProduction ready kubernetes
Production ready kubernetes
Arnaud MAZIN
 
NGINX DevSecOps Workshop
NGINX DevSecOps WorkshopNGINX DevSecOps Workshop
NGINX DevSecOps Workshop
NGINX, Inc.
 
NGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices WorkshopNGINX Basics and Best Practices Workshop
NGINX Basics and Best Practices Workshop
NGINX, 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
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
Kumaran Balachandran
 
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
Vietnam Open Infrastructure User Group
 
Speeding up your team with GitOps
Speeding up your team with GitOpsSpeeding up your team with GitOps
Speeding up your team with GitOps
Brice Fernandes
 
Wordpress vs JamStack
Wordpress vs JamStackWordpress vs JamStack
Wordpress vs JamStack
PierreBernardeau
 
GitOps w/argocd
GitOps w/argocdGitOps w/argocd
GitOps w/argocd
Jean-Philippe Bélanger
 
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
NGINX, Inc.
 
Building a Django App on Heroku
Building a Django App on HerokuBuilding a Django App on Heroku
Building a Django App on Heroku
Joe Fusaro
 
Gitops Hands On
Gitops Hands OnGitops Hands On
Gitops Hands On
Brice Fernandes
 
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
Nicolas De Loof
 

What's hot (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 to 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 2019
Cisco 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-1808
Cisco 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 GitOps
Weaveworks
 
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
Cisco 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 2018
Amazon 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-3891
Cisco 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-2071
Cisco DevNet
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
Nyros Technologies
 
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
jazoon13
 
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
Cisco DevNet
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
Vinothini KadambavanaSundaram
 
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 Github
Wycliff1
 
カエルと実践する 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-security
Cisco
 
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
Scott Graham
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
 

Similar to 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
 

Recently uploaded

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

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