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

GIT Onboarding

Andrés Amado
September 16, 2015

GIT Onboarding

GitHub Flow is a lightweight, branch-based workflow that supports teams and projects where deployments are made regularly. This guide explains how and why GitHub Flow works.

Andrés Amado

September 16, 2015
Tweet

More Decks by Andrés Amado

Other Decks in Programming

Transcript

  1. Rules ! - If you have any questions, please feel

    free to ask! - Teams… by Country! - Each team has at least two developers… - Boring talk... then demo! - Demo... then challenge! - Every developer has an ID! - Incremental challenges… Final!
  2. VCS

  3. VCS

  4. GIT

  5. Useful commands #!/usr/bin/env bash mkdir working-directory cd working-directory git init

    git status git config --global user.name "Andrés Amado" git config --global user.email [email protected] git config --global core.editor vim git config --global merge.tool meld git config --list vim .gitignore git add .gitignore git commit -m 'Add .gitignore' vim README.md git add .gitignore README.md git commit -m 'Add README file' git log
  6. Useful commands #!/usr/bin/env bash # Developer A git remote add

    origin [email protected]... git remote -v git push -u origin master # Developer B git clone [email protected]... my-working-directory cd my-working-directory git remote -v git config user.name "Andrés Amado" git config user.email [email protected] git pull origin master vim README.md git commit -am 'Update README file adding Andrés as contributor' git push origin master
  7. Branching Use other branches for development and merge them back

    to the master branch upon completion. Branches are used to develop features isolated from each other.
  8. Useful commands #!/usr/bin/env bash # Developer A git pull origin

    master git checkout -b add-colombia-team-thumbnails git branch mkdir thumbnails git status git add thumbnails git commit -m 'Add Colombia contributors thumbs' git fetch origin git pull origin master git push origin add-colombia-team-thumbnails git checkout master git pull origin master git checkout -b add-colombia-team-flag git push origin add-colombia-team-flag # Developer B git fetch origin git checkout --track origin/add-colombia-team-flag mkdir flags git add flags git commit -m 'Add Colombia team flag' git pull origin master git pull origin add-colombia-team-flag git push origin add-colombia-team-flag
  9. Useful commands #!/usr/bin/env bash # Developer A git checkout master

    git pull origin master git checkout -b add-api-structure git commit -m 'Fix #1, Add base project API structure' git pull origin master git push origin add-api-structure git branch -D add-api-structure # Developer B git checkout master git pull origin master git checkout -b add-model-layer git commit -m 'Fix #2, Add API model layer' git pull origin master git push origin add-model-layer git branch -D add-api-structure # Developer C git checkout master git pull origin master git checkout -b move-assets git mv flags/ client/ git mv thumbnails/ client/ git commit -m 'Move assets to API front-end static file path' git pull origin master git push origin move-assets git branch -D move-assets