SlideShare una empresa de Scribd logo
1 de 64
Descargar para leer sin conexión
Git - Step by step
Goal



                 We would like to make snapshots
                     of the university thesis.




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Thesis

                images/

                     univ_logo.png

                main_page.tex

                introduction.tex




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Create backup


        images                                        backup

            univ_logo.png                      copy    2011-09-11

        main_page.tex                                  2011-10-01_images_ready

        introduction.tex                               2011-11-22_release




Balabit Open Academy, Veszprém, Nov 30, 2011                     twitter.com/nucc
Later...
                                               time

             2011-09-11                               2011-10-01_images_ready

                images                                 images

                    univ_logo.png                        univ_logo.png

                main_page.tex                            cover_image.png

                introduction.tex                       main_page.tex

                                                       introduction.tex

                                                       first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                        twitter.com/nucc
++size

          backup/

             2011-09-11                        [300 bytes]
                                                                      time
             2011-10-01_images_ready           [228 kbytes]

             2011-11-22_release                [500 kbytes]


                                       Sum: 728 kbytes



Balabit Open Academy, Veszprém, Nov 30, 2011                  twitter.com/nucc
Changes by the time...
             2011-09-11                        2011-10-01_images_ready

                images                          images

                    univ_logo.png                 univ_logo.png

                main_page.tex                     cover_image.png

                introduction.tex                main_page.tex

                                                introduction.tex

                                                first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                 twitter.com/nucc
Optimizing
             2011-09-11                        2011-10-01_kepek_kesz

                images                          images

                    univ_logo.png                 univ_logo.png

                                                  cover_image.png

                main_page.tex                   main_page.tex

                introduction.tex                introduction.tex

                                                first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                 twitter.com/nucc
Transparency
                                               2011-10-01_kepek_kesz

                images                          images

                    univ_logo.png

                                                  cover_image.png

                main_page.tex                   main_page.tex

                introduction.tex

                                                first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                twitter.com/nucc
Transparency
             2011-10-01_kepek_kesz

                images

                    univ_logo.png

                   cover_image.png

                main_page.tex

                introduction.tex

                first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Stage
             2011-09-11                        2011-10-01_images_ready

                images                          images

                    univ_logo.png                 univ_logo.png

                                                  cover_image.png

                main_page.tex                   main_page.txt

                introduction.tex                introduction.tex

                                                first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                 twitter.com/nucc
Commit                           Stage      Date                Title

             2011-09-11                          2011-10-01_images...

                images                                images

                    univ_logo.png                       univ_logo.png

                                                        cover_image.png

                main_page.tex                         main_page.tex

                introduction.tex                      introduction.tex

                                                      first_chapter.tex


Balabit Open Academy, Veszprém, Nov 30, 2011                       twitter.com/nucc
Commits

                                                      head




                                               List




Balabit Open Academy, Veszprém, Nov 30, 2011             twitter.com/nucc
Structure
                                               Stage {
                                                 ... // changed files
                                               }

                                               Commit {
                                                 Date       date;
                                                 String     title;
                                                 Stage *    stage;
                                                 Commit *   parent;
                                               }

                                               Commit * head;
    head




Balabit Open Academy, Veszprém, Nov 30, 2011                            twitter.com/nucc
Operations                                 Stage {
                                                  ... // changed files
                                                }

                                                Commit {
                                                  Date       date;
                                                  String     title;
                                                  Stage *    stage;
                                                  Commit *   parent;
                                                }

 head = 0; // beginning                        Commit * head;

 git_commit(Stage * stage, String title)
 {
   Commit * commit = new Commit;

     commit->date         =   date();
     commit->title        =   title;
     commit->stage        =   stage;
     commit.parent        =   head;               head
     head = commit;
 }




Balabit Open Academy, Veszprém, Nov 30, 2011                    twitter.com/nucc
Operations                                 Stage {
                                                  ... // changed files
                                                }

                                                Commit {
                                                  Date       date;
                                                  String     title;
                                                  Stage *    stage;
                                                  Commit *   parent;
                                                }

 head = 0; // beginning                        Commit * head;

 git_commit(Stage * stage, String title)
 {
   Commit * commit = new Commit;

     commit->date         =   date();
     commit->title        =   title;
     commit->stage        =   stage;
     commit.parent        =   head;

     head = commit;
 }
                                                  head

Balabit Open Academy, Veszprém, Nov 30, 2011                    twitter.com/nucc
Process

                                               git init // head = 0
 stage = new Stage;
 stage->add("/README.txt");
                                               git add README.txt
 git_commit(stage, "init repo");
                                               git commit -m “init repo”


 stage = new Stage;
                                               git add “README.txt”
 stage->add("/README.txt");
 stage->add("/main.cpp");
                                               git add “main.cpp”
 git_commit(stage, "Added main.cpp");
                                               git commit -m “Added main.cpp”




Balabit Open Academy, Veszprém, Nov 30, 2011                  twitter.com/nucc
head




Balabit Open Academy, Veszprém, Nov 30, 2011      twitter.com/nucc
List



                                               <
                               Directed Tree

                            Directed Graph     <



Balabit Open Academy, Veszprém, Nov 30, 2011          twitter.com/nucc
Commits
                                                    head




                                           Directed tree



Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
Checkout
  // means change the head

  git_checkout(Commit * commit)
  {
    head = commit;                             head
  }

  git_checkout(0x45F34FE2)



                                                           ???????




Balabit Open Academy, Veszprém, Nov 30, 2011          twitter.com/nucc
Branches
                                                            head
  Commit * master;
  Commit * branch1;
                                               branch1
  git_checkout(branch1) <=> head = branch1




                                                              master




Balabit Open Academy, Veszprém, Nov 30, 2011             twitter.com/nucc
Tags

  Commit * const tag1;
  Commit * const tag2;


  git_checkout(tag1) <=> head = tag1




                                        tag1   tag1




Balabit Open Academy, Veszprém, Nov 30, 2011          twitter.com/nucc
Synchronizing
                                               branch1




                                               master




Balabit Open Academy, Veszprém, Nov 30, 2011        twitter.com/nucc
Pick
                                               branch1




                                               master




                          git cherry-pick [commit_id]

Balabit Open Academy, Veszprém, Nov 30, 2011             twitter.com/nucc
Pick
                                               branch1




                                                         master




                          git cherry-pick [commit_id]

Balabit Open Academy, Veszprém, Nov 30, 2011              twitter.com/nucc
Rebase
                                                        branch1




                                                        master




                                               building new base
                               rebase master to branch1

Balabit Open Academy, Veszprém, Nov 30, 2011                      twitter.com/nucc
branch1




                                                master




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
branch1




                                                master




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
!=   branch1




                                                    master




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011                  twitter.com/nucc
branch1




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
branch1




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
branch1




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
branch1




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
branch1




                                                                  master




                                      git rebase branch1

Balabit Open Academy, Veszprém, Nov 30, 2011               twitter.com/nucc
Merge
                                                branch1




                                                master




                                      git merge branch1

Balabit Open Academy, Veszprém, Nov 30, 2011              twitter.com/nucc
Merge
                                                branch1




                                                          master




                                      git merge branch1

Balabit Open Academy, Veszprém, Nov 30, 2011                   twitter.com/nucc
Backup?




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Backup?
                                                PenDrive
                                          D:
           NFS

                                                  SSH



Balabit Open Academy, Veszprém, Nov 30, 2011         twitter.com/nucc
Backup?
                                                PenDrive
                                          D:
           NFS

                                                  SSH
          Amazon Storage

Balabit Open Academy, Veszprém, Nov 30, 2011         twitter.com/nucc
Sharing?




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Sharing?

                           HTTP
                                               Samba

                                       FTP


Balabit Open Academy, Veszprém, Nov 30, 2011           twitter.com/nucc
List



                                               <
                               Directed Tree

                            Directed Graph     <



Balabit Open Academy, Veszprém, Nov 30, 2011          twitter.com/nucc
Directed Graph
                                               branch1




                                               master




Balabit Open Academy, Veszprém, Nov 30, 2011        twitter.com/nucc
Directed Graph




                          branch1




                           master




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Directed Graph




                          b
                          m




Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
Directed Graph
                                                        HTTP
                                        SSH              b
                                               b         m
                                               m

   Local
                          b
                          m
                                                   b
                                                   m
                                                       Github


Balabit Open Academy, Veszprém, Nov 30, 2011           twitter.com/nucc
Directed Graph
                                                        HTTP
                                        SSH              b
                                               b         m
                                               m

   Local
                          b
                          m
                                                   b
                                                   m
                                                       Github


Balabit Open Academy, Veszprém, Nov 30, 2011           twitter.com/nucc
Git remote
                                                          http
                                        SSH              b
                                               b         m
                                               m

   Local
                          b
                          m
                                                   b
                                                   m
                                                       github


Balabit Open Academy, Veszprém, Nov 30, 2011           twitter.com/nucc
Git remote



   Local
                          b
                          m
                                               b
                                               m
                                                   github


Balabit Open Academy, Veszprém, Nov 30, 2011       twitter.com/nucc
www.github.com




                                               b
                                               m
                                                   github


Balabit Open Academy, Veszprém, Nov 30, 2011       twitter.com/nucc
Clone


                                                    b
                                                    m
                                                          github



               git clone git@github.com:Nucc/check.it.git




Balabit Open Academy, Veszprém, Nov 30, 2011        twitter.com/nucc
Clone

      Local
                              b                origin   b
                              m                         m
                                                              github



               git clone git@github.com:Nucc/check.it.git




Balabit Open Academy, Veszprém, Nov 30, 2011            twitter.com/nucc
More remotes
                                                                 http
                                                            b
                                                            m
                                           webpage
     local
                                                                   github
                           b                   origin          b
                           m                                   m




       git remote -a http://nucc.balabit.hu/diploma weblap
Balabit Open Academy, Veszprém, Nov 30, 2011            twitter.com/nucc
Operations


    local                                                        github
                                               push
                           b                                 b
                           m                   pull          m




Balabit Open Academy, Veszprém, Nov 30, 2011          twitter.com/nucc
Operations


    local                                                              github
                                               push
                           b                                       b
                           m                   pull                m




                                   git pull origin/master

Balabit Open Academy, Veszprém, Nov 30, 2011                twitter.com/nucc
Operations

                                   git push origin master

    local                                                              github
                                               push
                           b                                       b
                           m                   pull                m




                                   git pull origin/master

Balabit Open Academy, Veszprém, Nov 30, 2011                twitter.com/nucc
Here and there...


    local                                                           github
                                               backup
                           b                                    b
                           m                   restore          m




Balabit Open Academy, Veszprém, Nov 30, 2011             twitter.com/nucc
Here and there...


    local                                                              github
                                               backup
                           b                                       b
                           m                   restore             m




                           git reset --hard origin/master

Balabit Open Academy, Veszprém, Nov 30, 2011                twitter.com/nucc
Here and there...

                                 git push -f origin master

    local                                                               github
                                               backup
                           b                                        b
                           m                   restore              m




                           git reset --hard origin/master

Balabit Open Academy, Veszprém, Nov 30, 2011                 twitter.com/nucc
Balabit Open Academy, Veszprém, Nov 30, 2011   twitter.com/nucc
b
                                                   m
                                                           b
                                                           m
                                      b
                                      m                b
                                               b       m
                         b
                         m                     m

                                                                 b
                                                                 m
                                      b
                                      m
                                                                     b
                                                                     m




Balabit Open Academy, Veszprém, Nov 30, 2011                   twitter.com/nucc
b
                                                   m
                                                           b
                                                           m
                                      b
                                      m                b
                                               b       m
                         b
                         m                     m

                                                                 b
                                                                 m
                                      b
                                      m
                                                                     b
                                                                     m




Balabit Open Academy, Veszprém, Nov 30, 2011                   twitter.com/nucc
?
                                       twitter.com/nucc



Balabit Open Academy, Veszprém, Nov 30, 2011              twitter.com/nucc

Más contenido relacionado

Último

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfSanaAli374401
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Último (20)

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Git thinking

  • 1. Git - Step by step
  • 2. Goal We would like to make snapshots of the university thesis. Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 3. Thesis images/ univ_logo.png main_page.tex introduction.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 4. Create backup images backup univ_logo.png copy 2011-09-11 main_page.tex 2011-10-01_images_ready introduction.tex 2011-11-22_release Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 5. Later... time 2011-09-11 2011-10-01_images_ready images images univ_logo.png univ_logo.png main_page.tex cover_image.png introduction.tex main_page.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 6. ++size backup/ 2011-09-11 [300 bytes] time 2011-10-01_images_ready [228 kbytes] 2011-11-22_release [500 kbytes] Sum: 728 kbytes Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 7. Changes by the time... 2011-09-11 2011-10-01_images_ready images images univ_logo.png univ_logo.png main_page.tex cover_image.png introduction.tex main_page.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 8. Optimizing 2011-09-11 2011-10-01_kepek_kesz images images univ_logo.png univ_logo.png cover_image.png main_page.tex main_page.tex introduction.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 9. Transparency 2011-10-01_kepek_kesz images images univ_logo.png cover_image.png main_page.tex main_page.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 10. Transparency 2011-10-01_kepek_kesz images univ_logo.png cover_image.png main_page.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 11. Stage 2011-09-11 2011-10-01_images_ready images images univ_logo.png univ_logo.png cover_image.png main_page.tex main_page.txt introduction.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 12. Commit Stage Date Title 2011-09-11 2011-10-01_images... images images univ_logo.png univ_logo.png cover_image.png main_page.tex main_page.tex introduction.tex introduction.tex first_chapter.tex Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 13. Commits head List Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 14. Structure Stage { ... // changed files } Commit { Date date; String title; Stage * stage; Commit * parent; } Commit * head; head Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 15. Operations Stage { ... // changed files } Commit { Date date; String title; Stage * stage; Commit * parent; } head = 0; // beginning Commit * head; git_commit(Stage * stage, String title) { Commit * commit = new Commit; commit->date = date(); commit->title = title; commit->stage = stage; commit.parent = head; head head = commit; } Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 16. Operations Stage { ... // changed files } Commit { Date date; String title; Stage * stage; Commit * parent; } head = 0; // beginning Commit * head; git_commit(Stage * stage, String title) { Commit * commit = new Commit; commit->date = date(); commit->title = title; commit->stage = stage; commit.parent = head; head = commit; } head Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 17. Process git init // head = 0 stage = new Stage; stage->add("/README.txt"); git add README.txt git_commit(stage, "init repo"); git commit -m “init repo” stage = new Stage; git add “README.txt” stage->add("/README.txt"); stage->add("/main.cpp"); git add “main.cpp” git_commit(stage, "Added main.cpp"); git commit -m “Added main.cpp” Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 18. head Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 19. List < Directed Tree Directed Graph < Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 20. Commits head Directed tree Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 21. Checkout // means change the head git_checkout(Commit * commit) { head = commit; head } git_checkout(0x45F34FE2) ??????? Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 22. Branches head Commit * master; Commit * branch1; branch1 git_checkout(branch1) <=> head = branch1 master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 23. Tags Commit * const tag1; Commit * const tag2; git_checkout(tag1) <=> head = tag1 tag1 tag1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 24. Synchronizing branch1 master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 25. Pick branch1 master git cherry-pick [commit_id] Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 26. Pick branch1 master git cherry-pick [commit_id] Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 27. Rebase branch1 master building new base rebase master to branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 28. branch1 master git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 29. branch1 master git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 30. != branch1 master git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 31. branch1 git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 32. branch1 git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 33. branch1 git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 34. branch1 git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 35. branch1 master git rebase branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 36. Merge branch1 master git merge branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 37. Merge branch1 master git merge branch1 Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 38. Backup? Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 39. Backup? PenDrive D: NFS SSH Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 40. Backup? PenDrive D: NFS SSH Amazon Storage Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 41. Sharing? Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 42. Sharing? HTTP Samba FTP Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 43. List < Directed Tree Directed Graph < Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 44. Directed Graph branch1 master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 45. Directed Graph branch1 master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 46. Directed Graph b m Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 47. Directed Graph HTTP SSH b b m m Local b m b m Github Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 48. Directed Graph HTTP SSH b b m m Local b m b m Github Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 49. Git remote http SSH b b m m Local b m b m github Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 50. Git remote Local b m b m github Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 51. www.github.com b m github Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 52. Clone b m github git clone git@github.com:Nucc/check.it.git Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 53. Clone Local b origin b m m github git clone git@github.com:Nucc/check.it.git Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 54. More remotes http b m webpage local github b origin b m m git remote -a http://nucc.balabit.hu/diploma weblap Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 55. Operations local github push b b m pull m Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 56. Operations local github push b b m pull m git pull origin/master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 57. Operations git push origin master local github push b b m pull m git pull origin/master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 58. Here and there... local github backup b b m restore m Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 59. Here and there... local github backup b b m restore m git reset --hard origin/master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 60. Here and there... git push -f origin master local github backup b b m restore m git reset --hard origin/master Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 61. Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 62. b m b m b m b b m b m m b m b m b m Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 63. b m b m b m b b m b m m b m b m b m Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc
  • 64. ? twitter.com/nucc Balabit Open Academy, Veszprém, Nov 30, 2011 twitter.com/nucc