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

Git and Github for Startups - Workshop

Git and Github for Startups - Workshop

Git is a Distributed Version Control System (DVCS), is one of the most important tools for IT startups. Github is a tool that give you the power to manage your Git repositories, manage issues, milestones, do code review and much more things.

This workshop will focus the basics of Git and show how to use Github effectively and also provide a branch model to use in your own startup.

This workshop was given @ The Startup Scholarship 2013 edition

0fe2d959c89cf2d9de497a237c4ea99d?s=128

Daniel Gomes

July 15, 2013
Tweet

More Decks by Daniel Gomes

Other Decks in Technology

Transcript

  1. Git and Github for Startups Daniel Gomes @danielcsgomes July 13,

    2013 workshop
  2. • Full Stack Web Developer @ Sedimap PT • Father,

    Geek • Zend Certi!ed Engineer PHP 5.3 • Certi!ed Scrum Master • @danielcsgomes About Me
  3. Agenda Git About Version Control Basics of Git A successful

    Git branching model Github About Github Using Github
  4. None
  5. About Version Control

  6. What is Version Control? Version control is a system that

    records changes to a file or set of files over time so that you can recall specific versions later.
  7. Types of Version Control System Local Version Control System Centralized

    Version Control System (VCS) Distributed Version Control System (DVCS)
  8. Local Version Control System

  9. Centralized Version Control System

  10. Distributed Version Control System

  11. Basics of Git Installing Git First Git project Basic Commands

  12. Installing Git First Git project Basic Commands Download http:/ /git-scm.com/downloads

  13. $ git config --global user.name "Your Name Here" $ git

    config --global user.email "Your Email Here" Add username and email to .gitconfig Installing Git First Git project Basic Commands
  14. Installing Git First Git project Basic Commands # First Git

    Project $ mkdir git_project $ cd git_project $ git init $ tree -a -L 2 . └── .git ├── HEAD ├── branches ├── config ├── description ├── hooks ├── info ├── objects └── refs
  15. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule
  16. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git init Create an empty git repository or reinitialize an existing one pull fetch merge rebase push clone reset rm submodule
  17. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git add Add file contents to the index pull fetch merge rebase push clone reset rm submodule
  18. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git status Show the working tree status pull fetch merge rebase push clone reset rm submodule
  19. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git commit Record changes to the repository pull fetch merge rebase push clone reset rm submodule
  20. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git log Show commit logs pull fetch merge rebase push clone reset rm submodule
  21. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git diff Show changes between commits, commit and working tree, etc pull fetch merge rebase push clone reset rm submodule
  22. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git branch List, create, or delete branches pull fetch merge rebase push clone reset rm submodule
  23. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git checkout Checkout a branch or paths to the working tree pull fetch merge rebase push clone reset rm submodule
  24. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag git tag Create, list, delete or verify a tag object signed with GPG pull fetch merge rebase push clone reset rm submodule
  25. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git pull Fetch from and merge with another repository or a local branch
  26. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git fetch Download objects and refs from another repository
  27. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git merge Join two or more development histories together
  28. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git rebase Forward-port local commits to the updated upstream head
  29. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git push Update remote refs along with associated objects
  30. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git clone Clone a repository into a new directory
  31. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git reset Reset current HEAD to the specified state
  32. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git rm Remove files from the working tree and from the index
  33. Installing Git First Git project Basic Commands init add status

    commit log diff branch checkout tag pull fetch merge rebase push clone reset rm submodule git submodule Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.
  34. A successful Git branching model http:/ /nvie.com/posts/a-successful-git-branching-model/

  35. None
  36. https:/ /github.com

  37. What is Github? Github is a powerful collaboration, code review,

    and code management tool for open source and private projects.
  38. About Github Founded in 2008 2013 more than 3 million

    users and 5 million repositories Free for Open Source projects
  39. Using Github

  40. Create an account (demo) https:/ /github.com/ Using Github

  41. Set Up Git for Github create the SSH key Using

    Github
  42. # generate the SSH Key $ ssh-keygen -t rsa -C

    "your_email@example.com" # Add your SSH key to Github $ cat ~/.ssh/id_rsa.pub # test if everything is working properly $ ssh -T git@github.com Create the SSH key Using Github Set Up Git for Github
  43. Create a repository (demo) Using Github

  44. Fork a repository (demo) Using Github

  45. Manage a repository (demo) Using Github

  46. Resources http:/ /git-scm.com/ http:/ /git-scm.com/book http:/ /gitref.org/ https:/ /www.kernel.org/pub/software/scm/git/docs/ http:/

    /nvie.com/posts/a-successful-git-branching-model/ https:/ /github.com/
  47. @danielcsgomes | me@danielcsgomes.com | http://danielcsgomes.com Jian Awe © http://www."ickr.com/photos/qqjawe/6511141237 Questions?