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

Daniel Gomes

July 15, 2013
Tweet

More Decks by Daniel Gomes

Other Decks in Technology

Transcript

  1. • Full Stack Web Developer @ Sedimap PT • Father,

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

    Git branching model Github About Github Using Github
  3. 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.
  4. Types of Version Control System Local Version Control System Centralized

    Version Control System (VCS) Distributed Version Control System (DVCS)
  5. $ 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
  6. 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
  7. 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
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  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 submodule Submodules allow foreign repositories to be embedded within a dedicated subdirectory of the source tree, always pointed at a particular commit.
  26. What is Github? Github is a powerful collaboration, code review,

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

    users and 5 million repositories Free for Open Source projects
  28. # generate the SSH Key $ ssh-keygen -t rsa -C

    "[email protected]" # Add your SSH key to Github $ cat ~/.ssh/id_rsa.pub # test if everything is working properly $ ssh -T [email protected] Create the SSH key Using Github Set Up Git for Github