SlideShare una empresa de Scribd logo
1 de 41
GETTING GIT
…before it gets you
HOW TO BE GOTTEN
 I am ‘notmessenger’ in most networks and
notmessenger.com/contact has the rest of the ways to find me
WHAT IS IT?
IT’S THE NEW HOTNESS!
 Source code management system
 Version control
 and …. Distributed!
DISTRIBUTED?
 There is no central server where your repository must be
maintained
 Also referred to as being “Decentralized”
 Everything you need to maintain a repository is already on your
local machine (once you have installed Git)
KEY CONCEPTS
REMEMBER THESE!
 Distributed
 Staging Area
 …or Index
 …or Cache
 …or Directory cache
 …or Current directory cache
 …or Staged files
STAGING AREA
WHERE GIT EXCELS
MORE AWESOMENESS!
 Branches
 Merging
 Stashes
COMMANDS
INIT
 Create a new repository
 Can be empty directory
 Can be existing codebase
 Example:
> git init
CONFIG
 Manage configuration
 Example:
> git config --global user.name ‘Jeremy Brown’
> git config --global user.email ‘jeremy@notmessenger.com’
STATUS
 Display the state of your codebase
 Has anything been modified or staged since the last commit?
 Example:
> git status
DIFF
 Show diff between states of codebase
 Example:
> git diff <filename>
ADD
 Start tracking new files
 Stage changes to already-tracked files
 Example:
> git add .
> git add NEWFILE
> git add ALREADY_EXISTENT_FILE
COMMIT
 Record the snapshot of your staged content
 Example:
> git commit
> git commit -m “Commit message”
> git commit -a
> git commit -am “Commit message”
LIVE DEMO
COLLABORATION
 Git doesn’t have a central server, such as how SVN or others do
 You collaborate by synchronizing with other repositories
 There is no real difference between a server and client – a Git
repository is a Git repository and you can synchronize between
any two easily
MORE COMMANDS
CHECKOUT
 Checkout a branch from a remote repository to working directory
 Example:
> git checkout <branchname>
FETCH
 Download new branches and data from a remote repository
 Is a separate copy of the data from the remote repository – it is
not merged with your local working copy
 Can then look through new commits, view logs, etc
 Example:
> git fetch
> git fetch [alias]
> git fetch --all
PULL
 First issues a FETCH command and then a MERGE command
 Example:
> git pull
> git pull [alias]
> git pull --all
PUSH
 Push your new branches and data to a remote repository
 If someone else has pushed since the last time you fetched and
merged the Git server will deny your push until you are up to date
 Example:
> git push [alias] [branch]
REMOTE
 List, add and delete remote repository aliases
 Example:
> git remote
> git remote add [alias] [url]
> git remote rm [alias]
BRANCH
 List, create or delete branches
 Example:
> git branch
> git branch <branchname>
> git branch –d <branchname>
MERGE
 Merge any branch into the current branch
 Example:
> git merge <branchname>
> git merge --no-commit <branchname>
STASH
 Takes the dirty state of your working directory and saves it on a
stack of unfinished changes that you can reapply at any time
 Example:
> git stash
> git stash list
> git stash apply <stashname>
> git stash drop <stashname>
LIVE DEMO
GUI TOOLS
MAKE YOUR LIFE EASIER
 GitHub for Mac/Windows/Eclipse/Mobile
 Git Tower
 Gitbox
 GitX
 SmartGit
DEMO OF GIT TOWER
CODE MANAGEMENT
STRATEGIES
HOW IS GIT GOING TO GET
YOU?
LOOKOUT!
 A few of the differences between it and previous generations of
SCMs
 The index (or stage)
 Distributed
 Commit history
 Git is the new hotness and is being used (virtually) everywhere
GOT IT?
RESOURCES
 git-scm.com
 git-tower.com
 github.com/nvie/gitflow
IMAGE CREDITS
 Slide 1 - joecrazy.com/wp-content/uploads/2012/05/14.jpg
 Slide 5 - jpegy.com/images/uploads/2012/03/battleshots.jpg
 Slide 9 - learn.github.com/images/staging.png
 Slide 11 - moustachemadness.files.wordpress.com/2012/02/handlebar-
moustache.jpg

Más contenido relacionado

La actualidad más candente

Git Workshop
Git WorkshopGit Workshop
Git Workshopalexyork
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleGaurav Kumar Garg
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about gitSothearin Ren
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git MigrationTim Massey
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Paradigma Digital
 
git- Most Of The Things About a Trending DVCS
git- Most Of The Things About a Trending DVCSgit- Most Of The Things About a Trending DVCS
git- Most Of The Things About a Trending DVCSIsuru Wimalasundera
 
Linux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzipLinux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzipKyle Mathews
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitRasan Samarasinghe
 
Install git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hostingInstall git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hostingC13L0
 
Introduction to Octopress at DRUG
Introduction to Octopress at DRUGIntroduction to Octopress at DRUG
Introduction to Octopress at DRUGWojciech Langiewicz
 
Linux server backup solution
Linux server backup solutionLinux server backup solution
Linux server backup solutionShaojie Yang
 

La actualidad más candente (19)

Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Git Workshop
Git WorkshopGit Workshop
Git Workshop
 
Version Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an exampleVersion Control Systems with git (and github) as an example
Version Control Systems with git (and github) as an example
 
Understanding about git
Understanding about gitUnderstanding about git
Understanding about git
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
 
SVN 2 Git
SVN 2 GitSVN 2 Git
SVN 2 Git
 
Git training
Git trainingGit training
Git training
 
Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?Git vs Subversion: ¿Cuando elegir uno u otro?
Git vs Subversion: ¿Cuando elegir uno u otro?
 
Git
GitGit
Git
 
git- Most Of The Things About a Trending DVCS
git- Most Of The Things About a Trending DVCSgit- Most Of The Things About a Trending DVCS
git- Most Of The Things About a Trending DVCS
 
Linux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzipLinux Backup System using rsync, tar, gzip
Linux Backup System using rsync, tar, gzip
 
Advanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with GitAdvanced Web Development in PHP - Code Versioning and Branching with Git
Advanced Web Development in PHP - Code Versioning and Branching with Git
 
Knolx master-slides
Knolx master-slidesKnolx master-slides
Knolx master-slides
 
Install git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hostingInstall git and drush on Godaddy shared hosting
Install git and drush on Godaddy shared hosting
 
Introduction to Octopress at DRUG
Introduction to Octopress at DRUGIntroduction to Octopress at DRUG
Introduction to Octopress at DRUG
 
Git workshop
Git workshopGit workshop
Git workshop
 
Android Libs - Retrofit
Android Libs - RetrofitAndroid Libs - Retrofit
Android Libs - Retrofit
 
Cse 241
Cse 241Cse 241
Cse 241
 
Linux server backup solution
Linux server backup solutionLinux server backup solution
Linux server backup solution
 

Destacado

Updating Your GivingFirst.org Profile
Updating  Your  GivingFirst.org  ProfileUpdating  Your  GivingFirst.org  Profile
Updating Your GivingFirst.org ProfileBryce Wilkinson
 
anteprima del nuovo catalogo di integratori GJAV
anteprima del nuovo catalogo di integratori GJAVanteprima del nuovo catalogo di integratori GJAV
anteprima del nuovo catalogo di integratori GJAVGJAV
 
8 7 Nrbb Flow
8 7 Nrbb Flow8 7 Nrbb Flow
8 7 Nrbb Flowwebsolve
 
A E A Introduction P D F Colombia
A E A  Introduction  P D F  ColombiaA E A  Introduction  P D F  Colombia
A E A Introduction P D F Colombiajbauzo
 
Esomar Beijing Preso
Esomar Beijing PresoEsomar Beijing Preso
Esomar Beijing PresoPeter Harris
 
Waardeverkenner
WaardeverkennerWaardeverkenner
WaardeverkennerAtrivé
 
在生命的幽谷看見人
在生命的幽谷看見人在生命的幽谷看見人
在生命的幽谷看見人Alicewang
 
Dos and donts of social media for educators 20150529
Dos and donts of social media for educators 20150529Dos and donts of social media for educators 20150529
Dos and donts of social media for educators 20150529dinica
 
Library questionnairewebinar7 2010
Library questionnairewebinar7 2010Library questionnairewebinar7 2010
Library questionnairewebinar7 2010Sue Bennett
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxRavi Kumar Lanke
 
QPWB Default Services E-Brochure
QPWB Default Services E-BrochureQPWB Default Services E-Brochure
QPWB Default Services E-Brochuremjbarker
 

Destacado (20)

Updating Your GivingFirst.org Profile
Updating  Your  GivingFirst.org  ProfileUpdating  Your  GivingFirst.org  Profile
Updating Your GivingFirst.org Profile
 
anteprima del nuovo catalogo di integratori GJAV
anteprima del nuovo catalogo di integratori GJAVanteprima del nuovo catalogo di integratori GJAV
anteprima del nuovo catalogo di integratori GJAV
 
8 7 Nrbb Flow
8 7 Nrbb Flow8 7 Nrbb Flow
8 7 Nrbb Flow
 
A E A Introduction P D F Colombia
A E A  Introduction  P D F  ColombiaA E A  Introduction  P D F  Colombia
A E A Introduction P D F Colombia
 
Esomar Beijing Preso
Esomar Beijing PresoEsomar Beijing Preso
Esomar Beijing Preso
 
Waardeverkenner
WaardeverkennerWaardeverkenner
Waardeverkenner
 
Presentation1
Presentation1Presentation1
Presentation1
 
在生命的幽谷看見人
在生命的幽谷看見人在生命的幽谷看見人
在生命的幽谷看見人
 
Dos and donts of social media for educators 20150529
Dos and donts of social media for educators 20150529Dos and donts of social media for educators 20150529
Dos and donts of social media for educators 20150529
 
Goldenmedia
GoldenmediaGoldenmedia
Goldenmedia
 
Toekomst van zonne-energiesystemen
Toekomst van zonne-energiesystemenToekomst van zonne-energiesystemen
Toekomst van zonne-energiesystemen
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Library questionnairewebinar7 2010
Library questionnairewebinar7 2010Library questionnairewebinar7 2010
Library questionnairewebinar7 2010
 
Noticias Teleco feb2011
Noticias Teleco feb2011Noticias Teleco feb2011
Noticias Teleco feb2011
 
Duurzaam Inkopen
Duurzaam InkopenDuurzaam Inkopen
Duurzaam Inkopen
 
Optiscan
OptiscanOptiscan
Optiscan
 
Carrefour Valle Del Lili
Carrefour Valle Del LiliCarrefour Valle Del Lili
Carrefour Valle Del Lili
 
Oracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linuxOracle applications r12.2.0 installation on linux
Oracle applications r12.2.0 installation on linux
 
Verduurzamen?Verduurzamen!
Verduurzamen?Verduurzamen!Verduurzamen?Verduurzamen!
Verduurzamen?Verduurzamen!
 
QPWB Default Services E-Brochure
QPWB Default Services E-BrochureQPWB Default Services E-Brochure
QPWB Default Services E-Brochure
 

Similar a Getting Git...before it gets you

Git slides
Git slidesGit slides
Git slidesNanyak S
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github Max Claus Nunes
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubDSC GVP
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentalsNaincy Gupta
 
Git for developers
Git for developersGit for developers
Git for developersHacen Dadda
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersNoam Kfir
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?9 series
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoLuis Bertel
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__greyKing Hom
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__whiteKing Hom
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_darkKing Hom
 

Similar a Getting Git...before it gets you (20)

Git slides
Git slidesGit slides
Git slides
 
Git
GitGit
Git
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Github By Nyros Developer
Github By Nyros DeveloperGithub By Nyros Developer
Github By Nyros Developer
 
Hacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHubHacktoberfest intro to Git and GitHub
Hacktoberfest intro to Git and GitHub
 
Git introduction
Git introductionGit introduction
Git introduction
 
Git basics
Git basicsGit basics
Git basics
 
Git and fundamentals
Git and fundamentalsGit and fundamentals
Git and fundamentals
 
Git for developers
Git for developersGit for developers
Git for developers
 
Git 101 for Beginners
Git 101 for Beginners Git 101 for Beginners
Git 101 for Beginners
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
 
Git
GitGit
Git
 
Git and github
Git and githubGit and github
Git and github
 
Git basics for beginners
Git basics for beginnersGit basics for beginners
Git basics for beginners
 
Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?Git Commands Every Developer Should Know?
Git Commands Every Developer Should Know?
 
Rc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocidoRc094 010d-git 2 - desconocido
Rc094 010d-git 2 - desconocido
 
Git and Github
Git and GithubGit and Github
Git and Github
 
Git cheat sheet__grey
Git cheat sheet__greyGit cheat sheet__grey
Git cheat sheet__grey
 
Git cheat sheet__white
Git cheat sheet__whiteGit cheat sheet__white
Git cheat sheet__white
 
Git cheat sheet_dark
Git cheat sheet_darkGit cheat sheet_dark
Git cheat sheet_dark
 

Último

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Último (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Getting Git...before it gets you

  • 2. HOW TO BE GOTTEN  I am ‘notmessenger’ in most networks and notmessenger.com/contact has the rest of the ways to find me
  • 3.
  • 5. IT’S THE NEW HOTNESS!  Source code management system  Version control  and …. Distributed!
  • 6. DISTRIBUTED?  There is no central server where your repository must be maintained  Also referred to as being “Decentralized”  Everything you need to maintain a repository is already on your local machine (once you have installed Git)
  • 8. REMEMBER THESE!  Distributed  Staging Area  …or Index  …or Cache  …or Directory cache  …or Current directory cache  …or Staged files
  • 11. MORE AWESOMENESS!  Branches  Merging  Stashes
  • 13. INIT  Create a new repository  Can be empty directory  Can be existing codebase  Example: > git init
  • 14. CONFIG  Manage configuration  Example: > git config --global user.name ‘Jeremy Brown’ > git config --global user.email ‘jeremy@notmessenger.com’
  • 15. STATUS  Display the state of your codebase  Has anything been modified or staged since the last commit?  Example: > git status
  • 16. DIFF  Show diff between states of codebase  Example: > git diff <filename>
  • 17. ADD  Start tracking new files  Stage changes to already-tracked files  Example: > git add . > git add NEWFILE > git add ALREADY_EXISTENT_FILE
  • 18. COMMIT  Record the snapshot of your staged content  Example: > git commit > git commit -m “Commit message” > git commit -a > git commit -am “Commit message”
  • 21.  Git doesn’t have a central server, such as how SVN or others do  You collaborate by synchronizing with other repositories  There is no real difference between a server and client – a Git repository is a Git repository and you can synchronize between any two easily
  • 23. CHECKOUT  Checkout a branch from a remote repository to working directory  Example: > git checkout <branchname>
  • 24. FETCH  Download new branches and data from a remote repository  Is a separate copy of the data from the remote repository – it is not merged with your local working copy  Can then look through new commits, view logs, etc  Example: > git fetch > git fetch [alias] > git fetch --all
  • 25. PULL  First issues a FETCH command and then a MERGE command  Example: > git pull > git pull [alias] > git pull --all
  • 26. PUSH  Push your new branches and data to a remote repository  If someone else has pushed since the last time you fetched and merged the Git server will deny your push until you are up to date  Example: > git push [alias] [branch]
  • 27. REMOTE  List, add and delete remote repository aliases  Example: > git remote > git remote add [alias] [url] > git remote rm [alias]
  • 28. BRANCH  List, create or delete branches  Example: > git branch > git branch <branchname> > git branch –d <branchname>
  • 29. MERGE  Merge any branch into the current branch  Example: > git merge <branchname> > git merge --no-commit <branchname>
  • 30. STASH  Takes the dirty state of your working directory and saves it on a stack of unfinished changes that you can reapply at any time  Example: > git stash > git stash list > git stash apply <stashname> > git stash drop <stashname>
  • 33. MAKE YOUR LIFE EASIER  GitHub for Mac/Windows/Eclipse/Mobile  Git Tower  Gitbox  GitX  SmartGit
  • 34. DEMO OF GIT TOWER
  • 36.
  • 37. HOW IS GIT GOING TO GET YOU?
  • 38. LOOKOUT!  A few of the differences between it and previous generations of SCMs  The index (or stage)  Distributed  Commit history  Git is the new hotness and is being used (virtually) everywhere
  • 41. IMAGE CREDITS  Slide 1 - joecrazy.com/wp-content/uploads/2012/05/14.jpg  Slide 5 - jpegy.com/images/uploads/2012/03/battleshots.jpg  Slide 9 - learn.github.com/images/staging.png  Slide 11 - moustachemadness.files.wordpress.com/2012/02/handlebar- moustache.jpg

Notas del editor

  1. Who has used SVN, CVS or Microsoft SourceSafe? Point out that one of the main differences is DISTRIBUTED
  2. Speak to some generic examples of this architecture.
  3. Can stage individual lines of a file for commit.
  4. Git records your name and email address with every commit you make. So the first step is to tell Git what these are.
  5. Stage and Unstaged changes Against Head Between branches
  6. git commit -a automatically stage all tracked, modified files before the commit -> SVN-like approach
  7. There is some work involved to support this synchronization which is why a lot of teams use Github or something similar. Github also provides a great way to host your code for others to get too without a lot of hassle.
  8. Keep in mind it’s not like SVN where you get new files from repo – you are just changing pointer in tree. git checkout <branchname> -> is also how you switch between branches
  9. Remember origin is an alias Can now do PUSH to remote
  10. git branch : existing branches are listed and the current branch will be highlighted with an asterisk. There are some options can pass as well – not going into those git branch <branchname> : creates a new branch head named <branchname> which points to the current HEAD, or <start-point> if given this will create the new branch, but it will not switch the working tree to it; use "git checkout <newbranch>" to switch to the new branch. git branch –d <branchname> : deletes branch can also rename, set upstream to track, etc
  11. Is a LIFO stack
  12. Commit history – everything is always in the repo and you are pointing to a point in the history