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

Software Version Control with Git and Github

taelor
March 12, 2015

Software Version Control with Git and Github

An introductory presentation about github, one that tells the tale of a markup feature, and a Code Wookie Intern

taelor

March 12, 2015
Tweet

Other Decks in Technology

Transcript

  1. What is Version Control •  Revision control, also known as

    version control and source control, is the management of changes to documents, computer programs, large web sites, and other collections of information. •  Changes are usually identified by a number or letter code, termed the "revision number", "revision level", or simply "revision". •  Each revision is associated with a timestamp and the person making the change.
  2. History of Version Control Generation Networking Operations Concurrency Examples First

    None One file at a time Locks RCS, SCCS Second Centralized Multi-file Merge before commit CVS, SourceSafe, Subversion, Team Foundation Server Third Distributed Changesets Commit before merge Bazaar, Git, Mercurial
  3. What is Github? •  Software as a Service for git

    •  Built by some Ruby guys, have since added some Erlang •  Online Social Coding / Open Source •  Enterprise
  4. Definitions • Code Repository •  a place where large amounts of

    source code are kept, either publicly or privately •  This code is usually stored on a centralized server •  “repo” for short
  5. Definitions • Commit •  To commit is to write or merge

    the changes made in the working copy back to the repository. •  Kind of like hitting the “save” button in a text editor, but for your code repo
  6. Definitions • Push •  when you want to give your commit

    changes to another remote repo • Pull/Fetch •  when you want to merge in someone else’s changes on the same branch
  7. Definitions • Branch •  Separate “timeline” of code •  Keep a

    feature’s development different from the main code line. •  “release/staging branch” – testing before moved into production
  8. Definitions • Merge •  When you have to bring in a

    set of external changes into your code base. •  This could be if you and another programmer are working on the same code. If they make a commit, you will need to merge that change in before.
  9. Now, this is the story all about how. My life

    got flipped-turned upside down... By github…
  10. Configuration… •  Git config •  git config --global user.name "YOUR

    NAME” •  git config --global user.email "YOUR EMAIL ADDRESS” •  SSH keys •  Public/Private key that lets github know you are really you •  https://help.github.com/articles/generating-ssh-keys/
  11. First Steps •  mkdir code/tripping-tribble •  echo "# tripping-tribble" >>

    README.md •  git init •  => Initialized empty Git repository in /Users/taelor/code/tripping-tribble.git/
  12. First Steps •  git add README.md •  git commit -m

    "first commit” •  => [master (root-commit) a1f0bbd] first commit •  1 file changed, 1 insertion(+) •  create mode 100644 README.md
  13. First Steps •  git remote add origin [email protected]:taelor/tripping-tribble.git •  git

    push -u origin master •  => Counting objects: 3, done. •  Writing objects: 100% (3/3), 232 bytes | 0 bytes/s, done. •  Total 3 (delta 0), reused 0 (delta 0) •  To [email protected]:taelor/tripping-tribble.git •  * [new branch] master -> master •  Branch master set up to track remote branch master from origin.