SlideShare uma empresa Scribd logo
1 de 19
Pimp my Git
  Pragmatic Git workflow
Pulling the right way

       Building a house
Multiple teams

One team builds the roof   Another seeds grass on the yard
Conflictless cooperation

          Oh, really?


            git pull
Git problem #721


“pull” does merge by default (rebase is an option)
Merging smarter


     git pull --rebase
Merge
Rebase
After rebase
Commandment


Thou shalt pull with --rebase option.
Merging even smarter

    $ sudo gem install git-up
Building a house
My workflow
  Create a private branch

    and do some work.
In the meantime



Someone else started working on the project
Risk of conflict
Rebase before merge
  On feature branch, rebase with master branch

            git rebase master
Resolve conflict
 Resolve conflict on your local branch




        git add .
        git rebase --continue
Merge with squash


git checkout master

git merge feature --squash

git commit
Why?

             Clean history

    Each work item == one commit
Do not trash log with checkpoint commits

        Conflicts resolved early
    Missing (unnecessary) granularity

Mais conteúdo relacionado

Mais procurados

CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsKumar Shìvam
 
GitHub Talk - Cody Carnachan
GitHub Talk - Cody CarnachanGitHub Talk - Cody Carnachan
GitHub Talk - Cody CarnachanCody Carnachan
 
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and DockerOSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and DockerGaurav Gahlot
 
Container based CI/CD on GitHub Actions
Container based CI/CD on GitHub ActionsContainer based CI/CD on GitHub Actions
Container based CI/CD on GitHub ActionsCasey Lee
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.jsStefan Stölzle
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewLuca Milanesio
 
GitHub Actions - Melbourne UG
GitHub Actions - Melbourne UGGitHub Actions - Melbourne UG
GitHub Actions - Melbourne UGNatraj Yegnaraman
 
Git简介
Git简介Git简介
Git简介clvrobj
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialHeather McNamee
 
Your own on-demand Angular projects with ngX-Rocket
Your own on-demand Angular projects with ngX-RocketYour own on-demand Angular projects with ngX-Rocket
Your own on-demand Angular projects with ngX-RocketYohan Lasorsa
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ GitheyMP
 
Slide: Introducing GitLab by ALMtoolbox
Slide: Introducing GitLab by ALMtoolboxSlide: Introducing GitLab by ALMtoolbox
Slide: Introducing GitLab by ALMtoolboxNoa Harel
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, futureLuca Milanesio
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Noa Harel
 

Mais procurados (20)

CICD Pipeline Using Github Actions
CICD Pipeline Using Github ActionsCICD Pipeline Using Github Actions
CICD Pipeline Using Github Actions
 
GitHub Talk - Cody Carnachan
GitHub Talk - Cody CarnachanGitHub Talk - Cody Carnachan
GitHub Talk - Cody Carnachan
 
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and DockerOSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
OSCONF - April 2021 - Run GitHub Actions Locally with nektos/act and Docker
 
Container based CI/CD on GitHub Actions
Container based CI/CD on GitHub ActionsContainer based CI/CD on GitHub Actions
Container based CI/CD on GitHub Actions
 
GitHub Actions with Node.js
GitHub Actions with Node.jsGitHub Actions with Node.js
GitHub Actions with Node.js
 
Github in Action
Github in ActionGithub in Action
Github in Action
 
Stable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code ReviewStable master workflow with Gerrit Code Review
Stable master workflow with Gerrit Code Review
 
GitHub Actions - Melbourne UG
GitHub Actions - Melbourne UGGitHub Actions - Melbourne UG
GitHub Actions - Melbourne UG
 
Git简介
Git简介Git简介
Git简介
 
Git
GitGit
Git
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
GitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorialGitLab 8.5 Highlights and Step-by-step tutorial
GitLab 8.5 Highlights and Step-by-step tutorial
 
Your own on-demand Angular projects with ngX-Rocket
Your own on-demand Angular projects with ngX-RocketYour own on-demand Angular projects with ngX-Rocket
Your own on-demand Angular projects with ngX-Rocket
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ Git
 
Git-r-Done
Git-r-DoneGit-r-Done
Git-r-Done
 
Slide: Introducing GitLab by ALMtoolbox
Slide: Introducing GitLab by ALMtoolboxSlide: Introducing GitLab by ALMtoolbox
Slide: Introducing GitLab by ALMtoolbox
 
3 workflow
3 workflow3 workflow
3 workflow
 
GerritHub.io - present, past, future
GerritHub.io - present, past, futureGerritHub.io - present, past, future
GerritHub.io - present, past, future
 
Git & GitLab
Git & GitLabGit & GitLab
Git & GitLab
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 

Destaque

How to build mobile API with Node.js
How to build mobile API with Node.jsHow to build mobile API with Node.js
How to build mobile API with Node.jsTomek Cejner
 
Data To Go: Mobile API Design (Lightning Talk)
Data To Go: Mobile API Design (Lightning Talk)Data To Go: Mobile API Design (Lightning Talk)
Data To Go: Mobile API Design (Lightning Talk)Chuck Greb
 
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and Capistrano
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and CapistranoDevelop and Deploy your Mobile API with Rails, Nginx, Unicorn and Capistrano
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and CapistranoErrazudin Ishak
 
Jordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-eraJordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-era.toster
 
Mobile API Design Techniques
Mobile API Design TechniquesMobile API Design Techniques
Mobile API Design TechniquesTrieu Nguyen
 
Designing an API for Mobile
Designing an API for MobileDesigning an API for Mobile
Designing an API for MobileSocialRadar
 
Creating an Effective Mobile API
Creating an Effective Mobile API Creating an Effective Mobile API
Creating an Effective Mobile API Nick DeNardis
 
Api mobile first
Api mobile firstApi mobile first
Api mobile firstChris Saez
 
Mobile Api and Caching
Mobile Api and CachingMobile Api and Caching
Mobile Api and CachingNew Relic
 
Mobile API: Design & Techniques
Mobile API: Design & TechniquesMobile API: Design & Techniques
Mobile API: Design & TechniquesFred Brunel
 
Data to Go: Mobile API Design
Data to Go: Mobile API DesignData to Go: Mobile API Design
Data to Go: Mobile API DesignChuck Greb
 
Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)Chuck Greb
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsStormpath
 
We we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad HippsWe we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad HippsPuerto Rico Tech Summit
 
Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)Wojtek Erbetowski
 

Destaque (16)

How to build mobile API with Node.js
How to build mobile API with Node.jsHow to build mobile API with Node.js
How to build mobile API with Node.js
 
Data To Go: Mobile API Design (Lightning Talk)
Data To Go: Mobile API Design (Lightning Talk)Data To Go: Mobile API Design (Lightning Talk)
Data To Go: Mobile API Design (Lightning Talk)
 
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and Capistrano
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and CapistranoDevelop and Deploy your Mobile API with Rails, Nginx, Unicorn and Capistrano
Develop and Deploy your Mobile API with Rails, Nginx, Unicorn and Capistrano
 
Jordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-eraJordi Romero Api for-the-mobile-era
Jordi Romero Api for-the-mobile-era
 
Mobile API Design Techniques
Mobile API Design TechniquesMobile API Design Techniques
Mobile API Design Techniques
 
Designing an API for Mobile
Designing an API for MobileDesigning an API for Mobile
Designing an API for Mobile
 
Creating an Effective Mobile API
Creating an Effective Mobile API Creating an Effective Mobile API
Creating an Effective Mobile API
 
Api mobile first
Api mobile firstApi mobile first
Api mobile first
 
Mobile Api and Caching
Mobile Api and CachingMobile Api and Caching
Mobile Api and Caching
 
Mobile API: Design & Techniques
Mobile API: Design & TechniquesMobile API: Design & Techniques
Mobile API: Design & Techniques
 
Data to Go: Mobile API Design
Data to Go: Mobile API DesignData to Go: Mobile API Design
Data to Go: Mobile API Design
 
Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)Data to Go: Mobile API Design (SXSW)
Data to Go: Mobile API Design (SXSW)
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
 
We we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad HippsWe we should be Mobile API - First, by Brad Hipps
We we should be Mobile API - First, by Brad Hipps
 
Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)Designing API for mobile apps (MobileWarsaw 19.01.2015)
Designing API for mobile apps (MobileWarsaw 19.01.2015)
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Semelhante a Pragmatic Git workflow

Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheetsozone777
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With GitNick Quaranto
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for ArtistsDavid Newbury
 
Git workflow in agile development
Git workflow in agile developmentGit workflow in agile development
Git workflow in agile developmentZack Siri
 
Git Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleGit Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleBo-Yi Wu
 
Git Merge, Resets and Branches
Git Merge, Resets and BranchesGit Merge, Resets and Branches
Git Merge, Resets and BranchesVictor Pudelski
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control SystemVictor Wong
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshopthemystic_ca
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)Carlos Duarte do Nascimento
 
Working with others using git and Github
Working with others using git and GithubWorking with others using git and Github
Working with others using git and GithubJacob Jenkins
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get GitSusan Tan
 
devops-complete-notes-2.pdf
devops-complete-notes-2.pdfdevops-complete-notes-2.pdf
devops-complete-notes-2.pdfRobinRohit2
 
Github - Le Wagon Melbourne
Github - Le Wagon MelbourneGithub - Le Wagon Melbourne
Github - Le Wagon MelbournePaal Ringstad
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testersupadhyay_25
 

Semelhante a Pragmatic Git workflow (20)

Git cheat-sheets
Git cheat-sheetsGit cheat-sheets
Git cheat-sheets
 
Wokshop de Git
Wokshop de Git Wokshop de Git
Wokshop de Git
 
Git Started With Git
Git Started With GitGit Started With Git
Git Started With Git
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git workflow in agile development
Git workflow in agile developmentGit workflow in agile development
Git workflow in agile development
 
Git Flow and JavaScript Coding Style
Git Flow and JavaScript Coding StyleGit Flow and JavaScript Coding Style
Git Flow and JavaScript Coding Style
 
Git Merge, Resets and Branches
Git Merge, Resets and BranchesGit Merge, Resets and Branches
Git Merge, Resets and Branches
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Subversion to Git Migration
Subversion to Git MigrationSubversion to Git Migration
Subversion to Git Migration
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 
git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)git fail --force (make it up with your pull requests)
git fail --force (make it up with your pull requests)
 
Git101
Git101Git101
Git101
 
Working with others using git and Github
Working with others using git and GithubWorking with others using git and Github
Working with others using git and Github
 
How to Really Get Git
How to Really Get GitHow to Really Get Git
How to Really Get Git
 
Working with Git
Working with GitWorking with Git
Working with Git
 
devops-complete-notes-2.pdf
devops-complete-notes-2.pdfdevops-complete-notes-2.pdf
devops-complete-notes-2.pdf
 
Github - Le Wagon Melbourne
Github - Le Wagon MelbourneGithub - Le Wagon Melbourne
Github - Le Wagon Melbourne
 
Session git
Session gitSession git
Session git
 
Git - Simplified For Testers
Git - Simplified For TestersGit - Simplified For Testers
Git - Simplified For Testers
 

Pragmatic Git workflow