SlideShare une entreprise Scribd logo
1  sur  32
Introduction to Git Administration
For New Administrators
Shawn Doyle
ReleaseTEAM Inc
sdoyle@releaseteam.com
www.linkedin.com/in/releaseteam/
http://twitter.com/ReleaseTEAMInc
Premium SCM Consulting firm since 1999
Focus on Software Configuration Management
On site and remote consulting services
– Build Automation
– CM tool administration, customization, upgrades, migrations
Classroom training / hands-on mentoring
R
e
l
e
a
s
e
T
E
ClearCase ClearQuest Jenkins
Git RTC Build Forge
SVN Jira Electric Commander
Shawn Doyle - ReleaseTEAM
 For the administrator new to Git
 An overview of Git
 Workflows
 Common admin tasks
 Access control
 Triggers
 Stories from the trenches
Subversion & Git Presentation
Agenda
Slide 4
So you now are a Git Admin
Git has sprung up in many organizations. Spreading like
a wild fire from the development groups.
– Developers want less restrictions to their productivity
– SCM is always seen as a restriction and rarely a necessary one
SCM admins are finding they need to support Git
regardless of existing corporate standards.
SCM admins need to find a way to control the chaos.
Most commercial SCM tools now support Git as a client.
Don’t panic Git is fun, powerful and it is the future.
Subversion & Git Presentation
Wait.. What? how did this happen
Slide 6
DVCS
– Learn the difference
Users
– Training
– Indulging the Git promoter(s)
Many solutions to common problems
– Authentication
– Workflows
– Multiple available UIs
Cleaning up after user mistakes
Subversion & Git Presentation
What am I in for?
Slide 7
1. RTFM http://git-scm.com/book
2. Now that you read the Git book, go thru these tutorials
3. Watch these videos - Google Tech Talks
Linus Torvalds on git
Randal Schwartz on Git
4. RTFW
https://git.wiki.kernel.org/index.php/Main_Page
5. Create a repo and start playing!
Subversion & Git Presentation
How I learned Git
Slide 8
Tutorials
http://try.github.io/levels/1/challenges/1 Code School
https://www.atlassian.com/git/tutorial/git-basics Atlassian's Git tutorial
http://gitready.com/ Git Ready
https://www.kernel.org/pub/software/scm/git/docs/everyday.html
Everyday GIT With 20 Commands Or So
Videos - Google Tech Talks
http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvalds
http://www.youtube.com/watch?v=8dhZ9BXQgc4 Randal Schwartz
Wiki
https://git.wiki.kernel.org/index.php/GitCommunity|Git Community Wiki
Subversion & Git Presentation
Resources
Slide 9
Git Overview
Subversion & Git Presentation Slide 10
When coming from another SCM system to Git you need
to shift how you think about how version control works.
In a more classic SCM you think of it as a system that
versions files in a tree or directory structure.
Git is better thought of as a system that versions trees of
files.
Biggest Obstacle
Stores whole copies of the repo
– No file deltas
– Entire tree is captured at each commit not just the files that
changed, a snapshot of the repo
Branches and tags
– Are pointers to commits
– Very fast and light weight
Subversion & Git Presentation
How Git Works
Slide 12
Git is:
– Powerful
– Complex
– Fast (local)
– worthy contender to replace many commercial tools
– the solution you are looking for
Object Storage
– Blobs
– SHA1s or hashes
– Trees
Perl like syntax
– ^ $ ~ …
Subversion & Git Presentation
Not Scared yet?
Slide 13
Workflows
Centralized
– Central repository
Feature Branch
– Central repository + branching per features
Gitflow
– Branches per features, releases and bug fixes
Forking
– Distributed workflow
Workflows
Uses a central repository
– single point-of-entry for all changes
– Everyone clones from the central repo
– Everyone pull/pushes from the same repo
Benefits
– SCM Admin can put controls/triggers on the central repo
– Security can be setup using tools like
• Stash
• Gitolite
• Gitosis
– SCM Builds and Deploys can be maintained from a clone of the
central repo.
Centralized
Development of features in isolated branches
– Allows features to be developed independently
As a feature is finished it is merged to the master branch
Subversion & Git Presentation
Feature Branch
Slide 17
Branches are focused around releases
Branches are also used for
– Release
– Integration or Test
– Features
Strict rules on how and when branches interact
Subversion & Git Presentation
Gitflow
Slide 18
Repos are forked per developer
– Developers work in isolation
One Repo is declared as the Official Repo
– A Project Maintainer integrates the Repos
– Developers sync with the Official Repo
Subversion & Git Presentation
Forking
Slide 19
Common Admin Tasks
What to Migrate? Snapshot in time or all history?
– Push for converting a snapshot in time
– If that fails, then try for a few key slices
– Arguments
• Why burden the new repo with all the history
• Populating new workspaces will take longer
• Leave old SCM system in a locked down state for reference
– Refactoring
• Always a good time to refactor when switching SCM system
• Can cause headaches if under deadlines
– Builds
• How dependent were you on the old SCM for builds
– Paths
– Build tools (e.g. clearmake)
– APIs, Libs
Migration Considerations
Client and Server concepts
Use a Client side hook for actions
– Commit
– Merge
– Rebase
Server Hooks
– Notification
– Rejecting Pushes
Hooks need to be copied to the repos
– Hooks are not part of cloning
– Hooks do not get updated with pull/pushes
In general, use hooks in Git to encourage workflow or for
notifications. Do not rely on them to enforce security
Subversion & Git Presentation
Hooks
Slide 22
Be Clever
– There is no one way to provide Security
– There is no single definition of Security
SSH keys
Git Repository Management
– Stash
– Gitolite
– Github
Triggers
Subversion & Git Presentation
Security
Slide 23
Sometimes a user removed something they didn’t mean
to.
The following commands are your friends when trying to
figure out what to restore and from where.
– Git log
– Git relog
– Git reset
– Git update-ref
Repos for backups
– Create clones on a safe network disk
– Pull to them once a day (or once a week)
– Use them to recover files or as a reference
Subversion & Git Presentation
Recovering files
Slide 24
Stories from the trenches
Builds failed after migrating a project from ClearCase to
Git
– Dev group certain the migration to Git had failed
– Build depended on a large number of sub directories to exist
– Git does not add empty directories
• It needs a blob to point to a directory for the directory to exist.
– Solution was to initially add the missing directories
• Created .temp files in each empty dir
• This creates a blob and the directory is added to Git
– Long term solution
• Encourage them to fix their build Ant/Make files.
Empty Directories
A user added multiple large files to his repo
– Then committed them and pushed them to the central repo
User removed them with ‘git rm –rf’
Why is this bad?
– Clone commands went from seconds to 20 minutes
Why?
– Git didn’t remove the large files from the initial commit
– Clone copies the entire repo locally, those files while no longer
visible are still copied
Solution
– Git filter-branch
– Git gc
– Git prune
Subversion & Git Presentation
Slow Clones
Slide 27
Client Requirements
– Contractors limited to sub dirs.
– All files in a single Repo.
Git by design
– Does not preserve directory permissions
– Hooks run before or after a Git command
– Submodules don’t offer additional protections
• Also broke the client single repo requirement
Subversion & Git Presentation
Directory Isolation
Slide 28
Client workflow depended on Tags
Git Tags are not shared by default
– Tags need to be explicitly;
• Pushed to the remote
• Pulled locally
Solutions
– Reevaluate Workflow
– Share pull command with Tag name
– Share Hash
Subversion & Git Presentation
Universal Tags
Slide 29
Client wanted to control who could create a local repo
– Git is not designed to do this
You can limit who can clone from a central Repo
– Stash/Gitolite
– SSH Keys
Once a Repo is cloned
– Nothing is stopping the user from cloning it again
– They can allow others to clone
Solution
– Lock down who can push back to the central Repo
Subversion & Git Presentation
Controlling local repos
Slide 30
Client wants to Clone one subdir of a Repo
– Build requires entire Repo
– Deploy requires one sub dir
– Build happens weeks before the deploy
– Deploy wants a fresh Repo
• Just build results and deployment script
Solution
– Submodules
Subversion & Git Presentation
Partial Clone
Slide 31
Questions
Shawn Doyle
ReleaseTEAM Inc
sdoyle@releaseteam.com
www.linkedin.com/in/releaseteam/
http://twitter.com/ReleaseTEAMInc

Contenu connexe

Tendances

Git slides
Git slidesGit slides
Git slidesNanyak S
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction TutorialThomas Rausch
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsLee Hanxue
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitE Carter
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and GithubHouari ZEGAI
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial IJim Yeh
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Noa Harel
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams Atlassian
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHubNicolás Tourné
 
Learning git
Learning gitLearning git
Learning gitSid Anand
 
Git Terminologies
Git TerminologiesGit Terminologies
Git TerminologiesYash
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practiceMajid Hosseini
 

Tendances (20)

Git slides
Git slidesGit slides
Git slides
 
Les bases de git
Les bases de gitLes bases de git
Les bases de git
 
Git Introduction Tutorial
Git Introduction TutorialGit Introduction Tutorial
Git Introduction Tutorial
 
Git training v10
Git training v10Git training v10
Git training v10
 
Git & GitHub WorkShop
Git & GitHub WorkShopGit & GitHub WorkShop
Git & GitHub WorkShop
 
Github - Git Training Slides: Foundations
Github - Git Training Slides: FoundationsGithub - Git Training Slides: Foundations
Github - Git Training Slides: Foundations
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
The everyday developer's guide to version control with Git
The everyday developer's guide to version control with GitThe everyday developer's guide to version control with Git
The everyday developer's guide to version control with Git
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git Branching Model
Git Branching ModelGit Branching Model
Git Branching Model
 
Introduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training SessionIntroduction to Gitlab | Gitlab 101 | Training Session
Introduction to Gitlab | Gitlab 101 | Training Session
 
Git Tutorial I
Git Tutorial IGit Tutorial I
Git Tutorial I
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
Git and Github Session
Git and Github SessionGit and Github Session
Git and Github Session
 
Git Branching for Agile Teams
Git Branching for Agile Teams Git Branching for Agile Teams
Git Branching for Agile Teams
 
Starting with Git & GitHub
Starting with Git & GitHubStarting with Git & GitHub
Starting with Git & GitHub
 
Learning git
Learning gitLearning git
Learning git
 
Git Terminologies
Git TerminologiesGit Terminologies
Git Terminologies
 
Git and git workflow best practice
Git and git workflow best practiceGit and git workflow best practice
Git and git workflow best practice
 
GitHub Presentation
GitHub PresentationGitHub Presentation
GitHub Presentation
 

En vedette

Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Gitgittower
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git RightSven Peters
 
Architecting IT to enable business success
Architecting IT to enable business successArchitecting IT to enable business success
Architecting IT to enable business successBSGAfrica
 
Subversion Admin
Subversion AdminSubversion Admin
Subversion Adminrchakra
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersKevlin Henney
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentationMack Hardy
 
Git Ready! Workflows
Git Ready! WorkflowsGit Ready! Workflows
Git Ready! WorkflowsAtlassian
 
Git workflows
Git workflowsGit workflows
Git workflowsXpand IT
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?John Congdon
 

En vedette (15)

Undoing Things in Git
Undoing Things in GitUndoing Things in Git
Undoing Things in Git
 
Getting Git Right
Getting Git RightGetting Git Right
Getting Git Right
 
Architecting IT to enable business success
Architecting IT to enable business successArchitecting IT to enable business success
Architecting IT to enable business success
 
Subversion Admin
Subversion AdminSubversion Admin
Subversion Admin
 
Git & Github for beginners
Git & Github for beginnersGit & Github for beginners
Git & Github for beginners
 
Seven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many ProgrammersSeven Ineffective Coding Habits of Many Programmers
Seven Ineffective Coding Habits of Many Programmers
 
Git workflows presentation
Git workflows presentationGit workflows presentation
Git workflows presentation
 
Git Tutorial 教學
Git Tutorial 教學Git Tutorial 教學
Git Tutorial 教學
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Git Ready! Workflows
Git Ready! WorkflowsGit Ready! Workflows
Git Ready! Workflows
 
My Git workflow
My Git workflowMy Git workflow
My Git workflow
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Git workflows
Git workflowsGit workflows
Git workflows
 
Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?Why Aren't You Using Git Flow?
Why Aren't You Using Git Flow?
 
git flow
git flowgit flow
git flow
 

Similaire à Introduction to git administration

Workflows using Git GitHub | Edureka
Workflows using Git GitHub | EdurekaWorkflows using Git GitHub | Edureka
Workflows using Git GitHub | EdurekaEdureka!
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing selfChen-Tien Tsai
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticlePRIYATHAMDARISI
 
Git and Markdown.pptx
Git and Markdown.pptxGit and Markdown.pptx
Git and Markdown.pptxRichard Anton
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for BeginnersMortezaTaghaddomi
 
Git interview questions | Edureka
Git interview questions | EdurekaGit interview questions | Edureka
Git interview questions | EdurekaEdureka!
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenchesNuno Caneco
 
Git Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeGit Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeCollabNet
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_finalMythri P K
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperJohn Stevenson
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForgeCollabNet
 
Git presentation to some coworkers some time ago
Git presentation to some coworkers some time agoGit presentation to some coworkers some time ago
Git presentation to some coworkers some time agoRodrigo Urubatan
 

Similaire à Introduction to git administration (20)

Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
Workflows using Git GitHub | Edureka
Workflows using Git GitHub | EdurekaWorkflows using Git GitHub | Edureka
Workflows using Git GitHub | Edureka
 
Lets git to it
Lets git to itLets git to it
Lets git to it
 
git presentation
git presentation git presentation
git presentation
 
Git essential training & sharing self
Git essential training & sharing selfGit essential training & sharing self
Git essential training & sharing self
 
Git workshop
Git workshopGit workshop
Git workshop
 
Introduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech ArticleIntroduction to GitHub, Open Source and Tech Article
Introduction to GitHub, Open Source and Tech Article
 
Git and Markdown.pptx
Git and Markdown.pptxGit and Markdown.pptx
Git and Markdown.pptx
 
Git introduction for Beginners
Git introduction for BeginnersGit introduction for Beginners
Git introduction for Beginners
 
Git interview questions | Edureka
Git interview questions | EdurekaGit interview questions | Edureka
Git interview questions | Edureka
 
3 Git
3 Git3 Git
3 Git
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
 
Git Gerrit Mit Teamforge
Git Gerrit Mit TeamforgeGit Gerrit Mit Teamforge
Git Gerrit Mit Teamforge
 
finall_(1).pptx
finall_(1).pptxfinall_(1).pptx
finall_(1).pptx
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final2015-ghci-presentation-git_gerritJenkins_final
2015-ghci-presentation-git_gerritJenkins_final
 
Git and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern DeveloperGit and github - Verson Control for the Modern Developer
Git and github - Verson Control for the Modern Developer
 
Open Source_Git.pptx
Open Source_Git.pptxOpen Source_Git.pptx
Open Source_Git.pptx
 
Git/Gerrit with TeamForge
Git/Gerrit with TeamForgeGit/Gerrit with TeamForge
Git/Gerrit with TeamForge
 
Git presentation to some coworkers some time ago
Git presentation to some coworkers some time agoGit presentation to some coworkers some time ago
Git presentation to some coworkers some time ago
 

Dernier

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456KiaraTiradoMicha
 

Dernier (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 

Introduction to git administration

  • 1. Introduction to Git Administration For New Administrators Shawn Doyle ReleaseTEAM Inc sdoyle@releaseteam.com www.linkedin.com/in/releaseteam/ http://twitter.com/ReleaseTEAMInc
  • 2. Premium SCM Consulting firm since 1999 Focus on Software Configuration Management On site and remote consulting services – Build Automation – CM tool administration, customization, upgrades, migrations Classroom training / hands-on mentoring R e l e a s e T E ClearCase ClearQuest Jenkins Git RTC Build Forge SVN Jira Electric Commander Shawn Doyle - ReleaseTEAM
  • 3.
  • 4.  For the administrator new to Git  An overview of Git  Workflows  Common admin tasks  Access control  Triggers  Stories from the trenches Subversion & Git Presentation Agenda Slide 4
  • 5. So you now are a Git Admin
  • 6. Git has sprung up in many organizations. Spreading like a wild fire from the development groups. – Developers want less restrictions to their productivity – SCM is always seen as a restriction and rarely a necessary one SCM admins are finding they need to support Git regardless of existing corporate standards. SCM admins need to find a way to control the chaos. Most commercial SCM tools now support Git as a client. Don’t panic Git is fun, powerful and it is the future. Subversion & Git Presentation Wait.. What? how did this happen Slide 6
  • 7. DVCS – Learn the difference Users – Training – Indulging the Git promoter(s) Many solutions to common problems – Authentication – Workflows – Multiple available UIs Cleaning up after user mistakes Subversion & Git Presentation What am I in for? Slide 7
  • 8. 1. RTFM http://git-scm.com/book 2. Now that you read the Git book, go thru these tutorials 3. Watch these videos - Google Tech Talks Linus Torvalds on git Randal Schwartz on Git 4. RTFW https://git.wiki.kernel.org/index.php/Main_Page 5. Create a repo and start playing! Subversion & Git Presentation How I learned Git Slide 8
  • 9. Tutorials http://try.github.io/levels/1/challenges/1 Code School https://www.atlassian.com/git/tutorial/git-basics Atlassian's Git tutorial http://gitready.com/ Git Ready https://www.kernel.org/pub/software/scm/git/docs/everyday.html Everyday GIT With 20 Commands Or So Videos - Google Tech Talks http://www.youtube.com/watch?v=4XpnKHJAok8 Linus Torvalds http://www.youtube.com/watch?v=8dhZ9BXQgc4 Randal Schwartz Wiki https://git.wiki.kernel.org/index.php/GitCommunity|Git Community Wiki Subversion & Git Presentation Resources Slide 9
  • 10. Git Overview Subversion & Git Presentation Slide 10
  • 11. When coming from another SCM system to Git you need to shift how you think about how version control works. In a more classic SCM you think of it as a system that versions files in a tree or directory structure. Git is better thought of as a system that versions trees of files. Biggest Obstacle
  • 12. Stores whole copies of the repo – No file deltas – Entire tree is captured at each commit not just the files that changed, a snapshot of the repo Branches and tags – Are pointers to commits – Very fast and light weight Subversion & Git Presentation How Git Works Slide 12
  • 13. Git is: – Powerful – Complex – Fast (local) – worthy contender to replace many commercial tools – the solution you are looking for Object Storage – Blobs – SHA1s or hashes – Trees Perl like syntax – ^ $ ~ … Subversion & Git Presentation Not Scared yet? Slide 13
  • 15. Centralized – Central repository Feature Branch – Central repository + branching per features Gitflow – Branches per features, releases and bug fixes Forking – Distributed workflow Workflows
  • 16. Uses a central repository – single point-of-entry for all changes – Everyone clones from the central repo – Everyone pull/pushes from the same repo Benefits – SCM Admin can put controls/triggers on the central repo – Security can be setup using tools like • Stash • Gitolite • Gitosis – SCM Builds and Deploys can be maintained from a clone of the central repo. Centralized
  • 17. Development of features in isolated branches – Allows features to be developed independently As a feature is finished it is merged to the master branch Subversion & Git Presentation Feature Branch Slide 17
  • 18. Branches are focused around releases Branches are also used for – Release – Integration or Test – Features Strict rules on how and when branches interact Subversion & Git Presentation Gitflow Slide 18
  • 19. Repos are forked per developer – Developers work in isolation One Repo is declared as the Official Repo – A Project Maintainer integrates the Repos – Developers sync with the Official Repo Subversion & Git Presentation Forking Slide 19
  • 21. What to Migrate? Snapshot in time or all history? – Push for converting a snapshot in time – If that fails, then try for a few key slices – Arguments • Why burden the new repo with all the history • Populating new workspaces will take longer • Leave old SCM system in a locked down state for reference – Refactoring • Always a good time to refactor when switching SCM system • Can cause headaches if under deadlines – Builds • How dependent were you on the old SCM for builds – Paths – Build tools (e.g. clearmake) – APIs, Libs Migration Considerations
  • 22. Client and Server concepts Use a Client side hook for actions – Commit – Merge – Rebase Server Hooks – Notification – Rejecting Pushes Hooks need to be copied to the repos – Hooks are not part of cloning – Hooks do not get updated with pull/pushes In general, use hooks in Git to encourage workflow or for notifications. Do not rely on them to enforce security Subversion & Git Presentation Hooks Slide 22
  • 23. Be Clever – There is no one way to provide Security – There is no single definition of Security SSH keys Git Repository Management – Stash – Gitolite – Github Triggers Subversion & Git Presentation Security Slide 23
  • 24. Sometimes a user removed something they didn’t mean to. The following commands are your friends when trying to figure out what to restore and from where. – Git log – Git relog – Git reset – Git update-ref Repos for backups – Create clones on a safe network disk – Pull to them once a day (or once a week) – Use them to recover files or as a reference Subversion & Git Presentation Recovering files Slide 24
  • 25. Stories from the trenches
  • 26. Builds failed after migrating a project from ClearCase to Git – Dev group certain the migration to Git had failed – Build depended on a large number of sub directories to exist – Git does not add empty directories • It needs a blob to point to a directory for the directory to exist. – Solution was to initially add the missing directories • Created .temp files in each empty dir • This creates a blob and the directory is added to Git – Long term solution • Encourage them to fix their build Ant/Make files. Empty Directories
  • 27. A user added multiple large files to his repo – Then committed them and pushed them to the central repo User removed them with ‘git rm –rf’ Why is this bad? – Clone commands went from seconds to 20 minutes Why? – Git didn’t remove the large files from the initial commit – Clone copies the entire repo locally, those files while no longer visible are still copied Solution – Git filter-branch – Git gc – Git prune Subversion & Git Presentation Slow Clones Slide 27
  • 28. Client Requirements – Contractors limited to sub dirs. – All files in a single Repo. Git by design – Does not preserve directory permissions – Hooks run before or after a Git command – Submodules don’t offer additional protections • Also broke the client single repo requirement Subversion & Git Presentation Directory Isolation Slide 28
  • 29. Client workflow depended on Tags Git Tags are not shared by default – Tags need to be explicitly; • Pushed to the remote • Pulled locally Solutions – Reevaluate Workflow – Share pull command with Tag name – Share Hash Subversion & Git Presentation Universal Tags Slide 29
  • 30. Client wanted to control who could create a local repo – Git is not designed to do this You can limit who can clone from a central Repo – Stash/Gitolite – SSH Keys Once a Repo is cloned – Nothing is stopping the user from cloning it again – They can allow others to clone Solution – Lock down who can push back to the central Repo Subversion & Git Presentation Controlling local repos Slide 30
  • 31. Client wants to Clone one subdir of a Repo – Build requires entire Repo – Deploy requires one sub dir – Build happens weeks before the deploy – Deploy wants a fresh Repo • Just build results and deployment script Solution – Submodules Subversion & Git Presentation Partial Clone Slide 31