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

Intro to Git and Github

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

Intro to Git and Github

Are you struggling to keep the source code up to date in group projects? Or have you heard about a technology used in the tech industry called Github and want to learn more? We'll start this session with a brief intro that will go over why you use version control and what problems you can solve with it. Then we'll dive into a hands-on tutorial using Git and Github. Attendees should have some knowledge of a programming language such as HTML, JavaScript, Python, or Java. Before the session, please signup for an account on GitHub

https://github.com/join

download Git for your operating system

https://git-scm.com/book/en/v2/Getting-Started-Installing-Git

and download SourceTree

https://www.sourcetreeapp.com

Avatar for jlstrater

jlstrater

April 21, 2017
Tweet

More Decks by jlstrater

Other Decks in Technology

Transcript

  1. @codeJENNerator About Me - Taking classes at the Technical University

    of Denmark and working on a research project - Also exploring Danish Culture with funding from the US Fulbright Grant program - Prior to the Fulbright Grant, I was a senior consultant at Object Partners, Inc. in Minneapolis, MN, USA. My work there is the subject of this talk. - Co-founder of Gr8Ladies and talk about women in the Groovy Community all over the world - Passionate about bring new people into the Groovy community through free introductory workshops called Gr8Workshops. - Moving to Berlin and starting at Zenjob in June 2017.
  2. @codeJENNerator Background • Programming Languages • Java • Python •

    JavaScript • R • Source Control • Git • Hg • Svn
  3. @codeJENNerator How can we version? • Change file names (file1,

    file2, filea, fileb, etc) • Use a tool with automatic save and revert i.e. Google Docs, Share Latex • Use a dedicated version control system
  4. @codeJENNerator Overview • a free and open source project •

    a protocol for versioning documents • can be used locally without a server • uses a tree structure • more videos: https://git-scm.com/videos
  5. @codeJENNerator Terms • init • clone • branch • add

    • commit • master • stash • fetch
  6. @codeJENNerator Terms • init • clone • branch • add

    • commit • master • stash • fetch • pull
  7. @codeJENNerator Terms • init • clone • branch • add

    • commit • master • stash • fetch • pull • push
  8. @codeJENNerator Terms • init • clone • branch • add

    • commit • master • stash • fetch • pull • push • merge
  9. @codeJENNerator • Init - start a new project locally •

    Clone - copy everything to your local computer • Branch - create a space to make your changes without affecting anything else • Add - add files to be saved • Commit - create a save point • Master - the main branch (by default) for everyone
  10. @codeJENNerator • Stash - save your changes and come back

    to them later • Fetch - get any changes from the server • Pull - fetch any changes from your teammates and merge it into your current local copy • Merge - include changes into a branch • Merges can happen when you want to include your changes in the team project (after a push) • Merges also happen when you want to get your team members work onto your own machine (after a pull)
  11. @codeJENNerator Github • a private for-profit company • hosts git

    source code repositories • helps you work as a team or with public groups • can also convert from svn, hg, or tfs to git • has a great UI for assisting with some common tasks • The logo is called the octocat ;)
  12. @codeJENNerator Repositories • private or part of an organization •

    can be ‘forked’ to make a copy from an existing project
  13. @codeJENNerator Repositories • private or part of an organization •

    can be ‘forked’ to make a copy from an existing project
  14. @codeJENNerator Repositories • private or part of an organization •

    can be ‘forked’ to make a copy from an existing project
  15. @codeJENNerator Read the docs for more on.. • Complex Branching

    and Rebasing • Enterprise Features • Using other git repositories like Bitbucket
  16. @codeJENNerator • There are many ways to version documents •

    No matter the way, pick one that works for you.
  17. @codeJENNerator • There are many ways to version documents •

    No matter the way, pick one that works for you. • Commit early, commit often!