Introduction to Version Control

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

Introduction to Version Control

Lightning talk on version control from Rails Girls London.

Frederick Cheung

April 20, 2013

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

17 slides
  1. Saving our bacon • Store your code securely • Throw

    away a change that doesn’t work • Find an older version that works • Find what change caused a problem
  2. Working with others • Allow people to work together without

    conflict • Avoid fragmentation of the codebase • Track who changed what, when, why
  3. Experimenting in isolation • You don’t want to release a

    half done or experimental feature • Create a copy of your codebase: a branch • When that feature is done, you merge that branch
  4. Lingo • You store code in a repository • You

    checkout code from a repository • You commit changes back to the repository • When you commit a change you write a commit message explaining your changes
  5. Keep commits small and focussed • Fix 1 bug •

    Add 1 feature • Not all the work from 1 day
  6. Commit messages are letters to your future self • Explain

    what you are doing, and why you are doing • 1 line summary, plus longer discussion if needed
  7. A bad commit message • Doesn’t tell you why you

    made the change. • Doesn’t describe what the change was • Won’t make much sense 6 months from now Twiddle some CSS
  8. A better commit message Fixed homepage rendering bug on firefox

    16 Firefox incorrectly calculates padding when nesting a something element in a something else element.
  9. There are many revision control systems • git, mercurial, bazaar,

    svn, darcs, perforce etc. • git is the most popular in the rails community
  10. Where to go from here • Install git! • Free

    git hosting at github.com • The git book - http://git-scm.com/book • GUIs: Tower, github for mac/windows

More Decks by Frederick Cheung

Other Decks in Technology