SlideShare uma empresa Scribd logo
1 de 60
Baixar para ler offline
Make the code work
for you with #Git


Tomáš Jukin
@Inza
Tomáš Jukin
     @Inza
   #Git
          #RubyOnRails
#Objective-C
A long story short...
...about a SCM tool
...about a SCM tool
         Source Code
         Management
SCM?
               Distributed



 Centralized
SCM?
               Distributed
                  Git,
                Mercurial,
                   ...
 Centralized
    CVS,
    SVN,
     ...
Why SCM?
                  We NEED to share code!
...and...
     FTP sucks
     Mail sucks
     Dropbox sucks
     USB drive sucks
Why SCM?
                  We NEED to share code!
...and...
     FTP sucks
     Mail sucks
     Dropbox sucks
     USB drive sucks
                          So?
Why SCM?



     Which SCM?
Which SCM?                      be independant
             Today, we NEED to:   be productive
                                  work offline
...and...                         have backup
                                  grow
    CVS is a history
    SVN is centralized
    Mercurial can’t rebase
    ...
Which SCM?                       be independant
             Today, we NEED to:    be productive
                                   work offline
...and...                          have backup
                                   grow
    CVS is a history
    SVN is centralized
    Mercurial can’t rebase
    ...                      So?
Distributed SCM
By geeks around Linux Kernel
The most powerful SCM out there
Tools Ecosystem   Rebase
Submodules        Cherry-pick
GitHub            Stash
http://git-scm.com/
http://book.git-scm.com/
http://progit.org/book/
Workflow



Me        You
Workflow



Me        You
Workflow



Me        You
Workflow
Workflow




Working
 Copy
Workflow




Working
 Copy
Workflow




Working      Local
 Copy        Repo
Workflow




Working      Local
 Copy        Repo
Workflow




Working    Index    Local
 Copy     (stage)   Repo
Workflow             Local Remote




Working    Index    Local
 Copy     (stage)   Repo
Workflow             Local Remote




Working    Index    Local
 Copy     (stage)   Repo
Workflow             Local Remote




Working    Index    Local     Remote
 Copy     (stage)   Repo       Repo
Workflow             Local Remote




Working    Index    Local     Remote
 Copy     (stage)   Repo       Repo
Workflow                   Local Remote




          add




Working          Index    Local     Remote
 Copy           (stage)   Repo       Repo
Workflow                   Local Remote




          add




Working          Index    Local     Remote
 Copy           (stage)   Repo       Repo
Workflow                            Local Remote




          add             commit




Working          Index             Local     Remote
 Copy           (stage)            Repo       Repo
Workflow                            Local Remote




          add             commit




Working          Index             Local     Remote
 Copy           (stage)            Repo       Repo
Workflow                            Local Remote




          add             commit           push




Working          Index             Local          Remote
 Copy           (stage)            Repo            Repo
Workflow                            Local Remote




          add             commit           push




Working          Index             Local          Remote
 Copy           (stage)            Repo            Repo
Workflow                            Local Remote




          add             commit           push




Working          Index             Local   fetch
                                                   Remote
 Copy           (stage)            Repo             Repo
Workflow                            Local Remote




          add             commit           push




Working          Index             Local   fetch
                                                   Remote
 Copy           (stage)            Repo             Repo
Workflow                            Local Remote




          add             commit           push




Working          Index    merge
                                   Local   fetch
                                                   Remote
 Copy           (stage)            Repo             Repo
Workflow                            Local Remote




          add             commit           push




Working          Index    merge
                                   Local   fetch
                                                   Remote
 Copy           (stage)            Repo             Repo
Workflow                                    Local Remote




          add                 commit               push




Working          Index        merge
                                           Local   fetch
                                                           Remote
 Copy           (stage)                    Repo             Repo



                          pull or rebase
Workflow                                    Local Remote




          add                 commit               push




Working          Index        merge
                                           Local   fetch
                                                           Remote
 Copy           (stage)                    Repo             Repo



                          pull or rebase
Workflow                  checkout HEAD
                                              Local Remote




          add                 commit               push




Working          Index        merge
                                           Local   fetch
                                                           Remote
 Copy           (stage)                    Repo             Repo



                          pull or rebase
Workflow                  checkout HEAD
                                              Local Remote




          add                 commit               push




Working          Index        merge
                                           Local   fetch
                                                           Remote
 Copy           (stage)                    Repo             Repo



                          pull or rebase
Workflow                  checkout HEAD
                                               Local Remote




          add                  commit               push




Working remove    Index        merge
                                            Local   fetch
                                                            Remote
 Copy            (stage)                    Repo             Repo



                           pull or rebase
Workflow                  checkout HEAD
                                                 Local Remote



    add                                     commit
                                                     push




Working remove    Index        merge
                                            Local    fetch
                                                             Remote
 Copy            (stage)                    Repo              Repo



                           pull or rebase
Workflow                     checkout HEAD
                                                    Local Remote



    add                                        commit
                                                        push
                  commit -a




Working remove    Index           merge
                                               Local    fetch
                                                                Remote
 Copy            (stage)                       Repo              Repo



                              pull or rebase
Workflow                    checkout HEAD
                                                    Local Remote


         add
                                               commit
                                                        push
add -A
                  commit -a




Working remove    Index           merge
                                               Local    fetch
                                                                Remote
 Copy            (stage)                       Repo              Repo



                              pull or rebase
Workflow                    checkout HEAD
                                                        Local Remote


             add
                                                   commit
                                                            push
    add -A
                      commit -a




    Working remove    Index           merge
                                                   Local    fetch
                                                                    Remote
     Copy            (stage)                       Repo              Repo
?
                                  pull or rebase
Workflow                   checkout HEAD
                                                        Local Remote


             add
                                                   commit
                                                            push
    add -A
                      commit -a




    Working remove    Index           merge
                                                   Local    fetch
                                                                    Remote
     Copy            (stage)                       Repo              Repo
?     status

                                  pull or rebase
Creation (in code)
                                 Local Repo

git clone git@repo.foo.com/foo.git foo_dir

cd foo_dir
   ...or...

mkdir foo_dir

cd foo_dir

git init
Creation (in code)
                  clone url      Local Repo

git clone git@repo.foo.com/foo.git foo_dir

cd foo_dir
   ...or...

mkdir foo_dir

cd foo_dir

git init
Creation (in code)
                       Remote Repo
mkdir foo.git

cd foo.git

git init --bare
Workflow (in code)


git add -a

git commit -m “Updated foo class”

git push
Workflow (in code)


git add -a

git commit -m “Updated foo class”

git push
Workflow (in code)

git pull

  ...or...

git fetch

git merge bar_branch
Installation
Windows
msysgit - http://goo.gl/YdToL

MacOS
brew install git

Linux
apt-get install git
GUI
Windows
TortoiseGit - http://goo.gl/9Gfhn
SmartGit - http://goo.gl/P8QqD
MacOS
GitX (L) - http://goo.gl/AMiqc
Linux
Choose yours - http://goo.gl/TebDq
Next?
     git flow


 “Just one approach to
solve branches, releases
     and versions”
Next?
   Links

Interactive Git Cheatsheet - http://goo.gl/8yMZY
GitHub - http://github.com
semver - http://semver.org
git flow (about) - http://goo.gl/MAF6m
git flow (CLI tool) - http://goo.gl/IbOJr
Tomáš Jukin
@Inza

@JuicymoCZ

Mais conteúdo relacionado

Semelhante a Make the code work for you with #git

Developing for Remote Bamboo Agents, AtlasCamp US 2012
Developing for Remote Bamboo Agents, AtlasCamp US 2012Developing for Remote Bamboo Agents, AtlasCamp US 2012
Developing for Remote Bamboo Agents, AtlasCamp US 2012Atlassian
 
1004 z2 env_positioned
1004 z2 env_positioned1004 z2 env_positioned
1004 z2 env_positionedHenning Blohm
 
持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术foxgem
 
Perforce Unplugged: Central and Distributed Versioning and distributed versio...
Perforce Unplugged: Central and Distributed Versioning and distributed versio...Perforce Unplugged: Central and Distributed Versioning and distributed versio...
Perforce Unplugged: Central and Distributed Versioning and distributed versio...Perforce
 
MEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop MicrosoftMEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop MicrosoftLee Stott
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the ScenesJoshua Long
 
Everything you wanted to know, but were afraid to ask about Oozie
Everything you wanted to know, but were afraid to ask about OozieEverything you wanted to know, but were afraid to ask about Oozie
Everything you wanted to know, but were afraid to ask about OozieChicago Hadoop Users Group
 
Getting started with GIT
Getting started with GITGetting started with GIT
Getting started with GITpratz0909
 
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...Cloudera, Inc.
 
Dell openstack boston meetup dell crowbar and open stack
Dell openstack boston meetup   dell crowbar and open stackDell openstack boston meetup   dell crowbar and open stack
Dell openstack boston meetup dell crowbar and open stackDellCloudEdge
 
Status update OEG - Nov 2012
Status update OEG - Nov 2012Status update OEG - Nov 2012
Status update OEG - Nov 2012dgarijo
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)Ritesh Angural
 
Oozie sweet
Oozie sweetOozie sweet
Oozie sweetmislam77
 

Semelhante a Make the code work for you with #git (20)

Developing for Remote Bamboo Agents, AtlasCamp US 2012
Developing for Remote Bamboo Agents, AtlasCamp US 2012Developing for Remote Bamboo Agents, AtlasCamp US 2012
Developing for Remote Bamboo Agents, AtlasCamp US 2012
 
Basic Git
Basic GitBasic Git
Basic Git
 
1004 z2 env_positioned
1004 z2 env_positioned1004 z2 env_positioned
1004 z2 env_positioned
 
Git 101
Git 101Git 101
Git 101
 
持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术持续交付 - 使用云计算和虚拟化技术
持续交付 - 使用云计算和虚拟化技术
 
Perforce Unplugged: Central and Distributed Versioning and distributed versio...
Perforce Unplugged: Central and Distributed Versioning and distributed versio...Perforce Unplugged: Central and Distributed Versioning and distributed versio...
Perforce Unplugged: Central and Distributed Versioning and distributed versio...
 
TAO DAYS - API (IT Session)
TAO DAYS - API (IT Session)TAO DAYS - API (IT Session)
TAO DAYS - API (IT Session)
 
MEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop MicrosoftMEW22 22nd Machine Evaluation Workshop Microsoft
MEW22 22nd Machine Evaluation Workshop Microsoft
 
Optimized Hive replication
Optimized Hive replicationOptimized Hive replication
Optimized Hive replication
 
Spring Batch Behind the Scenes
Spring Batch Behind the ScenesSpring Batch Behind the Scenes
Spring Batch Behind the Scenes
 
Everything you wanted to know, but were afraid to ask about Oozie
Everything you wanted to know, but were afraid to ask about OozieEverything you wanted to know, but were afraid to ask about Oozie
Everything you wanted to know, but were afraid to ask about Oozie
 
Fabric for fun_and_profit
Fabric for fun_and_profitFabric for fun_and_profit
Fabric for fun_and_profit
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
Getting started with GIT
Getting started with GITGetting started with GIT
Getting started with GIT
 
Talk about fabric
Talk about fabricTalk about fabric
Talk about fabric
 
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...
Hadoop World 2011: Proven Tools to Manage Hadoop Environments - Joey Jablonsk...
 
Dell openstack boston meetup dell crowbar and open stack
Dell openstack boston meetup   dell crowbar and open stackDell openstack boston meetup   dell crowbar and open stack
Dell openstack boston meetup dell crowbar and open stack
 
Status update OEG - Nov 2012
Status update OEG - Nov 2012Status update OEG - Nov 2012
Status update OEG - Nov 2012
 
Lightning branches at RedMart (Js conf Asia 2014 Talk)
Lightning branches at RedMart (Js conf Asia 2014  Talk)Lightning branches at RedMart (Js conf Asia 2014  Talk)
Lightning branches at RedMart (Js conf Asia 2014 Talk)
 
Oozie sweet
Oozie sweetOozie sweet
Oozie sweet
 

Mais de Tomáš Jukin

How you can build a robot Dr. Strangelove would approve
How you can build a robot Dr. Strangelove would approveHow you can build a robot Dr. Strangelove would approve
How you can build a robot Dr. Strangelove would approveTomáš Jukin
 
When a robot is smart enough?
When a robot is smart enough?When a robot is smart enough?
When a robot is smart enough?Tomáš Jukin
 
How to build Open Hardware self-navigating car robot
How to build Open Hardware self-navigating car robotHow to build Open Hardware self-navigating car robot
How to build Open Hardware self-navigating car robotTomáš Jukin
 
MQTT is your best friend
MQTT is your best friendMQTT is your best friend
MQTT is your best friendTomáš Jukin
 
Internet of Things & Open HW for Web Developers
Internet of Things & Open HW for Web DevelopersInternet of Things & Open HW for Web Developers
Internet of Things & Open HW for Web DevelopersTomáš Jukin
 
Arduino Neural Networks
Arduino Neural NetworksArduino Neural Networks
Arduino Neural NetworksTomáš Jukin
 
Multi-Agent Systems on Arduino & iOS
Multi-Agent Systems on Arduino & iOSMulti-Agent Systems on Arduino & iOS
Multi-Agent Systems on Arduino & iOSTomáš Jukin
 
CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!Tomáš Jukin
 
Bezpečnost platformy iOS
Bezpečnost platformy iOSBezpečnost platformy iOS
Bezpečnost platformy iOSTomáš Jukin
 
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013Tomáš Jukin
 
MVC na iOS - For-Mobile 2/2013
MVC na iOS - For-Mobile 2/2013MVC na iOS - For-Mobile 2/2013
MVC na iOS - For-Mobile 2/2013Tomáš Jukin
 
iOS6 & CocoaPods - For-Mobile 9/2012
iOS6 & CocoaPods - For-Mobile 9/2012iOS6 & CocoaPods - For-Mobile 9/2012
iOS6 & CocoaPods - For-Mobile 9/2012Tomáš Jukin
 
Tools beyond ruby on rails
Tools beyond ruby on railsTools beyond ruby on rails
Tools beyond ruby on railsTomáš Jukin
 

Mais de Tomáš Jukin (13)

How you can build a robot Dr. Strangelove would approve
How you can build a robot Dr. Strangelove would approveHow you can build a robot Dr. Strangelove would approve
How you can build a robot Dr. Strangelove would approve
 
When a robot is smart enough?
When a robot is smart enough?When a robot is smart enough?
When a robot is smart enough?
 
How to build Open Hardware self-navigating car robot
How to build Open Hardware self-navigating car robotHow to build Open Hardware self-navigating car robot
How to build Open Hardware self-navigating car robot
 
MQTT is your best friend
MQTT is your best friendMQTT is your best friend
MQTT is your best friend
 
Internet of Things & Open HW for Web Developers
Internet of Things & Open HW for Web DevelopersInternet of Things & Open HW for Web Developers
Internet of Things & Open HW for Web Developers
 
Arduino Neural Networks
Arduino Neural NetworksArduino Neural Networks
Arduino Neural Networks
 
Multi-Agent Systems on Arduino & iOS
Multi-Agent Systems on Arduino & iOSMulti-Agent Systems on Arduino & iOS
Multi-Agent Systems on Arduino & iOS
 
CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!
 
Bezpečnost platformy iOS
Bezpečnost platformy iOSBezpečnost platformy iOS
Bezpečnost platformy iOS
 
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
ONscreen vs. OFFscreen rendering v iOS - For-Mobile 3/2013
 
MVC na iOS - For-Mobile 2/2013
MVC na iOS - For-Mobile 2/2013MVC na iOS - For-Mobile 2/2013
MVC na iOS - For-Mobile 2/2013
 
iOS6 & CocoaPods - For-Mobile 9/2012
iOS6 & CocoaPods - For-Mobile 9/2012iOS6 & CocoaPods - For-Mobile 9/2012
iOS6 & CocoaPods - For-Mobile 9/2012
 
Tools beyond ruby on rails
Tools beyond ruby on railsTools beyond ruby on rails
Tools beyond ruby on rails
 

Último

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Último (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Make the code work for you with #git

  • 1. Make the code work for you with #Git Tomáš Jukin @Inza
  • 2. Tomáš Jukin @Inza #Git #RubyOnRails #Objective-C
  • 3. A long story short...
  • 5. ...about a SCM tool Source Code Management
  • 6. SCM? Distributed Centralized
  • 7. SCM? Distributed Git, Mercurial, ... Centralized CVS, SVN, ...
  • 8. Why SCM? We NEED to share code! ...and... FTP sucks Mail sucks Dropbox sucks USB drive sucks
  • 9. Why SCM? We NEED to share code! ...and... FTP sucks Mail sucks Dropbox sucks USB drive sucks So?
  • 10. Why SCM? Which SCM?
  • 11. Which SCM? be independant Today, we NEED to: be productive work offline ...and... have backup grow CVS is a history SVN is centralized Mercurial can’t rebase ...
  • 12. Which SCM? be independant Today, we NEED to: be productive work offline ...and... have backup grow CVS is a history SVN is centralized Mercurial can’t rebase ... So?
  • 13.
  • 14. Distributed SCM By geeks around Linux Kernel The most powerful SCM out there
  • 15. Tools Ecosystem Rebase Submodules Cherry-pick GitHub Stash
  • 23. Workflow Working Local Copy Repo
  • 24. Workflow Working Local Copy Repo
  • 25. Workflow Working Index Local Copy (stage) Repo
  • 26. Workflow Local Remote Working Index Local Copy (stage) Repo
  • 27. Workflow Local Remote Working Index Local Copy (stage) Repo
  • 28. Workflow Local Remote Working Index Local Remote Copy (stage) Repo Repo
  • 29. Workflow Local Remote Working Index Local Remote Copy (stage) Repo Repo
  • 30. Workflow Local Remote add Working Index Local Remote Copy (stage) Repo Repo
  • 31. Workflow Local Remote add Working Index Local Remote Copy (stage) Repo Repo
  • 32. Workflow Local Remote add commit Working Index Local Remote Copy (stage) Repo Repo
  • 33. Workflow Local Remote add commit Working Index Local Remote Copy (stage) Repo Repo
  • 34. Workflow Local Remote add commit push Working Index Local Remote Copy (stage) Repo Repo
  • 35. Workflow Local Remote add commit push Working Index Local Remote Copy (stage) Repo Repo
  • 36. Workflow Local Remote add commit push Working Index Local fetch Remote Copy (stage) Repo Repo
  • 37. Workflow Local Remote add commit push Working Index Local fetch Remote Copy (stage) Repo Repo
  • 38. Workflow Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo
  • 39. Workflow Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo
  • 40. Workflow Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 41. Workflow Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 42. Workflow checkout HEAD Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 43. Workflow checkout HEAD Local Remote add commit push Working Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 44. Workflow checkout HEAD Local Remote add commit push Working remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 45. Workflow checkout HEAD Local Remote add commit push Working remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 46. Workflow checkout HEAD Local Remote add commit push commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 47. Workflow checkout HEAD Local Remote add commit push add -A commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo pull or rebase
  • 48. Workflow checkout HEAD Local Remote add commit push add -A commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo ? pull or rebase
  • 49. Workflow checkout HEAD Local Remote add commit push add -A commit -a Working remove Index merge Local fetch Remote Copy (stage) Repo Repo ? status pull or rebase
  • 50. Creation (in code) Local Repo git clone git@repo.foo.com/foo.git foo_dir cd foo_dir ...or... mkdir foo_dir cd foo_dir git init
  • 51. Creation (in code) clone url Local Repo git clone git@repo.foo.com/foo.git foo_dir cd foo_dir ...or... mkdir foo_dir cd foo_dir git init
  • 52. Creation (in code) Remote Repo mkdir foo.git cd foo.git git init --bare
  • 53. Workflow (in code) git add -a git commit -m “Updated foo class” git push
  • 54. Workflow (in code) git add -a git commit -m “Updated foo class” git push
  • 55. Workflow (in code) git pull ...or... git fetch git merge bar_branch
  • 56. Installation Windows msysgit - http://goo.gl/YdToL MacOS brew install git Linux apt-get install git
  • 57. GUI Windows TortoiseGit - http://goo.gl/9Gfhn SmartGit - http://goo.gl/P8QqD MacOS GitX (L) - http://goo.gl/AMiqc Linux Choose yours - http://goo.gl/TebDq
  • 58. Next? git flow “Just one approach to solve branches, releases and versions”
  • 59. Next? Links Interactive Git Cheatsheet - http://goo.gl/8yMZY GitHub - http://github.com semver - http://semver.org git flow (about) - http://goo.gl/MAF6m git flow (CLI tool) - http://goo.gl/IbOJr