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

Introduction to Git

Ian Lee
July 25, 2016

Introduction to Git

Collaboration and coordination are at the heart of any multi person software project. Code needs to be shared between developers, shared with users, and inspected by the community. This is particularly prominent in the Open Source community where sharing of highly available and visible code has enabled the creation of such large and diverse software development communities as Python, Bootstrap, and the Linux kernel.

Git is a distributed version control system which has emerged as the industry standard for software development over the past 10 years. This replaces centralized servers as the one source of truth for a code base, and instead gives all developers the same access to the history of a project on their own workstations as the core development team. With the power that Git provides, however, comes a certain level of complexity that can be intimidating to newer users. This talk will focus on the small handful of commands that will allow you to get years of development experience and interact with the broader software community, both here at LLNL and beyond.

Ian Lee

July 25, 2016
Tweet

More Decks by Ian Lee

Other Decks in Technology

Transcript

  1. LLNL-PRES-698283 This work was performed under the auspices of the

    U.S. Department of Energy by Lawrence Livermore National Laboratory under contract DE-AC52-07NA27344. Lawrence Livermore National Security, LLC Introduc)on to Git Ian Lee [email protected] July 25, 2016
  2. LLNL-PRES-698283 2 §  git --version —  2.9.2 §  Opera7ng System

    —  OS X / Linux §  Markdown / Unix Inspired Style FormaEng —  $ shell prompt command —  `code` —  <REQUIRED, BUT CUSTOM PARAMETER> —  [OPTIONAL PARAMETER] —  `$ foo [bar] <baz>` Define your terms
  3. LLNL-PRES-698283 5 Fear of Git If that doesn't fix it,

    git.txt contains the phone number of a friend of mine who understands git. Just wait through a few minutes of 'It's really pre=y simple, just think of branches as...' and eventually you'll learn the commands that will fix everything. h_ps://xkcd.com/1597/
  4. LLNL-PRES-698283 6 §  Required —  $ git config --global user.name

    “Ian Lee” —  $ git config --global user.email “[email protected]” §  Op7onal (but recommended) —  $ git config --global color.ui true —  $ git config --global creden7al.helper “cache --7meout=43200” —  $ git config --global push.default simple §  For this course —  $ git config --global core.pager cat §  More informa7on —  h_ps://myconfluence.llnl.gov/display/GIT/Git+Config Configuring Git: `man git-config`
  5. LLNL-PRES-698283 71 §  Git Confluence Space —  h_ps://myconfluence.llnl.gov/display/git §  Git

    Tutorials —  h_ps://try.github.io/ —  h_p://learngitbranching.js.org/ —  h_ps://www.atlassian.com/git/ §  Commandline help —  $ man git —  $ git –help §  This talk —  h_ps://speakerdeck.com/ianlee1521/introduc7on-to-git GeSng Help