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 (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
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
 
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
 
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
 
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
 
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
 

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

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
 
cisco networking automation presentation.pdf
cisco networking automation presentation.pdfcisco networking automation presentation.pdf
cisco networking automation presentation.pdf
Srikrishna Komatineni
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
Cisco DevNet
 
TechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer ProgramTechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer Program
Robb Boyd
 
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Cisco DevNet
 
What network architects need to know about the evolving software lifecycle (S...
What network architects need to know about the evolving software lifecycle (S...What network architects need to know about the evolving software lifecycle (S...
What network architects need to know about the evolving software lifecycle (S...
Marco Coulter
 
GitHub Gone Wrong - Lessons learned from organic open source
GitHub Gone Wrong - Lessons learned from organic open sourceGitHub Gone Wrong - Lessons learned from organic open source
GitHub Gone Wrong - Lessons learned from organic open source
All Things Open
 
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
 
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
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and ConfigurationsInclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Anne Gentle
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration
Damien Garros
 
OpenStack Enabling DevOps
OpenStack Enabling DevOpsOpenStack Enabling DevOps
OpenStack Enabling DevOps
Cisco DevNet
 
Why Automate the Network?
Why Automate the Network?Why Automate the Network?
Why Automate the Network?
Hank Preston
 
138-03 Python, Git, GitHub and CI-CD.pdf
138-03 Python, Git, GitHub and CI-CD.pdf138-03 Python, Git, GitHub and CI-CD.pdf
138-03 Python, Git, GitHub and CI-CD.pdf
jesuszagarra
 
What's New in Grizzly & Deploying OpenStack with Puppet
What's New in Grizzly & Deploying OpenStack with PuppetWhat's New in Grizzly & Deploying OpenStack with Puppet
What's New in Grizzly & Deploying OpenStack with Puppet
Mark Voelker
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
Gaurav Wable
 
Cisco Connect Toronto 2018 DevNet Overview
Cisco Connect Toronto 2018  DevNet OverviewCisco Connect Toronto 2018  DevNet Overview
Cisco Connect Toronto 2018 DevNet Overview
Cisco Canada
 
Perforce Innovations Showcase 
Perforce Innovations Showcase Perforce Innovations Showcase 
Perforce Innovations Showcase 
Perforce
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018
Tessa Mero
 
Git Ninja (bigapp KT)
Git Ninja (bigapp KT)Git Ninja (bigapp KT)
Git Ninja (bigapp KT)
Ashok Kumar
 
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
 
cisco networking automation presentation.pdf
cisco networking automation presentation.pdfcisco networking automation presentation.pdf
cisco networking automation presentation.pdf
Srikrishna Komatineni
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
Cisco DevNet
 
TechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer ProgramTechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer Program
Robb Boyd
 
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Webex APIs for Administrators - DEVNET_2610 - Cisco Live 2019
Cisco DevNet
 
What network architects need to know about the evolving software lifecycle (S...
What network architects need to know about the evolving software lifecycle (S...What network architects need to know about the evolving software lifecycle (S...
What network architects need to know about the evolving software lifecycle (S...
Marco Coulter
 
GitHub Gone Wrong - Lessons learned from organic open source
GitHub Gone Wrong - Lessons learned from organic open sourceGitHub Gone Wrong - Lessons learned from organic open source
GitHub Gone Wrong - Lessons learned from organic open source
All Things Open
 
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
 
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
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and ConfigurationsInclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Anne Gentle
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration
Damien Garros
 
OpenStack Enabling DevOps
OpenStack Enabling DevOpsOpenStack Enabling DevOps
OpenStack Enabling DevOps
Cisco DevNet
 
Why Automate the Network?
Why Automate the Network?Why Automate the Network?
Why Automate the Network?
Hank Preston
 
138-03 Python, Git, GitHub and CI-CD.pdf
138-03 Python, Git, GitHub and CI-CD.pdf138-03 Python, Git, GitHub and CI-CD.pdf
138-03 Python, Git, GitHub and CI-CD.pdf
jesuszagarra
 
What's New in Grizzly & Deploying OpenStack with Puppet
What's New in Grizzly & Deploying OpenStack with PuppetWhat's New in Grizzly & Deploying OpenStack with Puppet
What's New in Grizzly & Deploying OpenStack with Puppet
Mark Voelker
 
Cisco Connect Toronto 2018 DevNet Overview
Cisco Connect Toronto 2018  DevNet OverviewCisco Connect Toronto 2018  DevNet Overview
Cisco Connect Toronto 2018 DevNet Overview
Cisco Canada
 
Perforce Innovations Showcase 
Perforce Innovations Showcase Perforce Innovations Showcase 
Perforce Innovations Showcase 
Perforce
 
Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018Chatbots Workshop SF JS Meetup May 2018
Chatbots Workshop SF JS Meetup May 2018
Tessa Mero
 
Git Ninja (bigapp KT)
Git Ninja (bigapp KT)Git Ninja (bigapp KT)
Git Ninja (bigapp KT)
Ashok Kumar
 

Recently uploaded (20)

Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
The 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptxThe 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptx
aptyai
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Content and eLearning Standards: Finding the Best Fit for Your-Training
Content and eLearning Standards: Finding the Best Fit for Your-TrainingContent and eLearning Standards: Finding the Best Fit for Your-Training
Content and eLearning Standards: Finding the Best Fit for Your-Training
Rustici Software
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
The 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptxThe 2025 Digital Adoption Blueprint.pptx
The 2025 Digital Adoption Blueprint.pptx
aptyai
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
AI Trends - Mary Meeker
AI Trends - Mary MeekerAI Trends - Mary Meeker
AI Trends - Mary Meeker
Razin Mustafiz
 
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Protecting Your Sensitive Data with Microsoft Purview - IRMS 2025
Nikki Chapple
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Multistream in SIP and NoSIP @ OpenSIPS Summit 2025
Lorenzo Miniero
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Building Agents with LangGraph & Gemini
Building Agents with LangGraph &  GeminiBuilding Agents with LangGraph &  Gemini
Building Agents with LangGraph & Gemini
HusseinMalikMammadli
 
Content and eLearning Standards: Finding the Best Fit for Your-Training
Content and eLearning Standards: Finding the Best Fit for Your-TrainingContent and eLearning Standards: Finding the Best Fit for Your-Training
Content and eLearning Standards: Finding the Best Fit for Your-Training
Rustici Software
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Dev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API WorkflowsDev Dives: System-to-system integration with UiPath API Workflows
Dev Dives: System-to-system integration with UiPath API Workflows
UiPathCommunity
 
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioMaster tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 Professio
Kari Kakkonen
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Measuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI SuccessMeasuring Microsoft 365 Copilot and Gen AI Success
Measuring Microsoft 365 Copilot and Gen AI Success
Nikki Chapple
 
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 ADr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr Jimmy Schwarzkopf presentation on the SUMMIT 2025 A
Dr. Jimmy Schwarzkopf
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
Talk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya WeersTalk: On an adventure into the depths of Maven - Kaya Weers
Talk: On an adventure into the depths of Maven - Kaya Weers
Kaya Weers
 

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/[email protected] 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 [email protected] 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 [email protected]: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/[email protected] 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 • [email protected] • @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