Slide 1

Slide 1 text

Intro to Git and Github Jenn Strater @codeJENNerator

Slide 2

Slide 2 text

@codeJENNerator https://speakerdeck.com/jlstrater/intro-to-git-2017 Follow Along

Slide 3

Slide 3 text

@codeJENNerator About Me

Slide 4

Slide 4 text

@codeJENNerator About Me Starting at Zenjob in Berlin in June 2017!

Slide 5

Slide 5 text

@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.

Slide 6

Slide 6 text

@codeJENNerator Background

Slide 7

Slide 7 text

@codeJENNerator Background • Programming Languages • Java • Python • JavaScript • R

Slide 8

Slide 8 text

@codeJENNerator Background • Programming Languages • Java • Python • JavaScript • R

Slide 9

Slide 9 text

@codeJENNerator Background • Programming Languages • Java • Python • JavaScript • R • Source Control • Git • Hg • Svn

Slide 10

Slide 10 text

@codeJENNerator What is Version Control?

Slide 11

Slide 11 text

@codeJENNerator https://vimeo.com/41027679

Slide 12

Slide 12 text

@codeJENNerator https://vimeo.com/41027679

Slide 13

Slide 13 text

@codeJENNerator Why use Versioning?

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

@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

Slide 16

Slide 16 text

@codeJENNerator Types of Version Control

Slide 17

Slide 17 text

@codeJENNerator Centralized

Slide 18

Slide 18 text

@codeJENNerator Examples • Subversion (SVN) • Concurrent Versions System (CVS)

Slide 19

Slide 19 text

Problems

Slide 20

Slide 20 text

@codeJENNerator Problems • Checkouts • Merges

Slide 21

Slide 21 text

@codeJENNerator Distributed

Slide 22

Slide 22 text

@codeJENNerator Advantages • easy to manage • better merge conflict resolution

Slide 23

Slide 23 text

@codeJENNerator Examples • Git • Mercurial (Hg)

Slide 24

Slide 24 text

@codeJENNerator

Slide 25

Slide 25 text

@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

Slide 26

Slide 26 text

@codeJENNerator Terms

Slide 27

Slide 27 text

@codeJENNerator Terms • init

Slide 28

Slide 28 text

@codeJENNerator Terms • init • clone

Slide 29

Slide 29 text

@codeJENNerator Terms • init • clone • branch

Slide 30

Slide 30 text

@codeJENNerator Terms • init • clone • branch • add

Slide 31

Slide 31 text

@codeJENNerator Terms • init • clone • branch • add • commit

Slide 32

Slide 32 text

@codeJENNerator Terms • init • clone • branch • add • commit • master

Slide 33

Slide 33 text

@codeJENNerator Terms • init • clone • branch • add • commit • master • stash

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

@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

Slide 39

Slide 39 text

@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)

Slide 40

Slide 40 text

@codeJENNerator Gui Source Tree

Slide 41

Slide 41 text

@codeJENNerator Command Line >git init

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

@codeJENNerator Github img src: https://www.flickr.com/photos/24874528@N04/17125924230

Slide 44

Slide 44 text

@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 ;)

Slide 45

Slide 45 text

Profiles

Slide 46

Slide 46 text

Organizations

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

@codeJENNerator Read the docs for more on.. • Complex Branching and Rebasing • Enterprise Features • Using other git repositories like Bitbucket

Slide 51

Slide 51 text

@codeJENNerator Conclusion

Slide 52

Slide 52 text

@codeJENNerator

Slide 53

Slide 53 text

@codeJENNerator • There are many ways to version documents

Slide 54

Slide 54 text

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

Slide 55

Slide 55 text

@codeJENNerator • There are many ways to version documents • No matter the way, pick one that works for you. • Commit early, commit often!

Slide 56

Slide 56 text

@codeJENNerator Questions? https://flic.kr/p/5DeuzB

Slide 57

Slide 57 text

@codeJENNerator Time for Tutorials!

Slide 58

Slide 58 text

@codeJENNerator Hello World - Github GUI • https://guides.github.com/activities/hello-world/

Slide 59

Slide 59 text

@codeJENNerator Code Academy (Free) • https://www.codecademy.com/learn/learn-git

Slide 60

Slide 60 text

@codeJENNerator Basic Tutorial with Command Line • http://product.hubspot.com/blog/git-and-github- tutorial-for-beginners

Slide 61

Slide 61 text

@codeJENNerator Learn Git with Bitbucket • https://www.atlassian.com/git/tutorials/learn-git-with- bitbucket-cloud

Slide 62

Slide 62 text

@codeJENNerator Advanced

Slide 63

Slide 63 text

@codeJENNerator Stashing • https://www.atlassian.com/git/tutorials/git-stash

Slide 64

Slide 64 text

@codeJENNerator Complete Example • https://www.learnenough.com/git-tutorial • Starts very basic, but scroll down for more advanced topics

Slide 65

Slide 65 text

@codeJENNerator List of More Tutorials • https://gist.github.com/jaseemabid/1321592

Slide 66

Slide 66 text

@codeJENNerator Command Cheat Sheet • https://github.com/kennyyu/bootcamp-git/wiki/ Basic-git-workflow

Slide 67

Slide 67 text

@codeJENNerator More Videos • https://git-scm.com/videos