Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Hello World 2016 - Git basics and team worflows

Hello World 2016 - Git basics and team worflows

Título: Internet of Things
Autor: Manuel Rocha
Homepage: http://ciromiranda.pt/
Contacto: ciro.miranda[at]jovago.com

Hello World Tech Conference

February 10, 2016
Tweet

Transcript

  1. Local Version Control Local version control central repository • Bad

    for collaboration • Error prone • Possibility to overwrite the wrong files
  2. Centralized Version Control Centralized version control • More control •

    Better for sharing • Better for collaboration, but, • Server is needed for every action (commit, checkout, history) • Single point of failure
  3. Distributed Version Control Distributed version control • Better for collaboration

    • Every clone is a copy of the repository • With the exception of pull and push, every action is local! • Very fast!
  4. Git $ git clone <repo-url> $ git status $ git

    checkout -b new-stuff < do some stuff (good and tested stuff) > $ git add <files> $ git status $ git commit -m ‘My awesome development’ $ git pull $ git push -u origin new-stuff
  5. Git Workflow - Working in teams What is a workflow

    and how to define it? There is more than one workflow: • Centralized workflow • Feature branch workflow • Git Flow workflow • Forking workflow
  6. Git Workflow - Working in teams Parallel Development Using feature

    branches isolates the development in progress from finished work. Feature branch are used to develop new features that are integrated (merged) only when done!
  7. Git Workflow - Working in teams Release Staging Area Complete

    work needs to be integrated all together in one place. There should be a specific branch to do continuous integration, validating every contribution to the code base by building the application and running tests.
  8. Git Workflow - Working in teams Support For Emergency Fixes

    Hotfixes should be easy to do not blocked by current development. Hotfix branches should only contain the code needed to solve the issue.
  9. Git Workflow - Working in teams Git Flow (Vincent Driesen)

    Branches • master (production ready) • develop (integration) • feature (new features) • release (support release preparation) • hotfix (quick production fix)
  10. Thank you • https://guides.github.com/introduction/flow/ • https://www.atlassian.com/git/tutorials/compa ring-workflows/ • https://try.github.io/levels/1/challenges/1 •

    http://git-scm.com/book/en/v2/ • http://nvie.com/posts/a-successful-git- branching-model/ source: https://m.xkcd.com/1597/