Intro to Github. Jessica Young

Similar documents
Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Github/Git Primer. Tyler Hague

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

Software Development I

Git Setup Help using GitKraken (CSE 154)

Visualizing Git Workflows. A visual guide to 539 workflows

Version Control with Git ME 461 Fall 2018

Using GitHub to Share with SparkFun a

The Old World. Have you ever had to collaborate on a project by

Code Repository. P Blanchfield

Tips on how to set up a GitHub account:

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

Using SourceTree on the Development Server

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

How to git with proper etiquette

Lab 08. Command Line and Git

A L A TEX-oriented intro to Git

Getting started with GitHub

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Tizen/Artik IoT Practice Part 4 Open Source Development

Improving Your Life With Git

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Git, the magical version control

CS314 Software Engineering Configuration Management

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

Using git to download and update BOUT++

Agenda. - Final Project Info. - All things Git. - Make sure to come to lab for Python next week

Revision control. INF5750/ Lecture 2 (Part I)

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

G E T T I N G S TA R T E D W I T H G I T

Using GitHub and SourceTree to work with DITA TC repositories

Version Control System GIT

Revision Control and GIT

Human-Computer Interaction Design

Tutorial 2 GitHub Tutorial

Git. CSCI 5828: Foundations of Software Engineering Lecture 02a 08/27/2015

CS 390 Software Engineering Lecture 5 More Git

Effective Software Development and Version Control

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

699DR git/github Tutorial

Using Git to Manage Source RTL

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

b. Developing multiple versions of a software project in parallel

Introduction to Git and Github Repositories

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Version Control for Fun and Profit

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

Online Remote Repositories

Human-Computer Interaction Design

Using GitHub for scientific research

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

A BASIC UNDERSTANDING OF VERSION CONTROL

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.


Sample Spark Web-App. Overview. Prerequisites

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at

Git tutorial. Katie Osterried C2SM. October 22, 2015

The Rock branching strategy is based on the Git Branching Model documented by Vincent Driessen.

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b

Git. Presenter: Haotao (Eric) Lai Contact:

History...: Displays a window of Gitk, a standard commit viewer for Git.

Lecture Homepages as of FS 2017

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Lecture 6 Remotes. Sign in on the attendance sheet!

Lab Objective. Lab Assignment. Downloads and Installation

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

Git for Subversion users

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A:

Version Control Systems (Part 1)

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

Git Introduction CS 400. February 11, 2018

Review Version Control Concepts

GitHub for Developers Training Manual. -v1.0

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

Experimental Psychology Lab Practice tidy cooperation

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1

Git & Github Fundamental by Rajesh Kumar.

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

Using PowerPoint - 1

USING DRUPAL. Hampshire College Website Editors Guide

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

Introduction to Git. Database Systems DataLab, CS, NTHU Spring, 2018

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Git for Version Control

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

2 Initialize a git repository on your machine, add a README file, commit and push

Git Basi, workflow e concetti avanzati (pt2)

git-pr Release dev2+ng5b0396a

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

FEEG Applied Programming 3 - Version Control and Git II

OER Publishing with LaTeX and GitHub

git and the virtue of version control ECE /2/2015

Transcription:

Intro to Github Jessica Young jyoung22@nd.edu

GitHub Basics 1. Installing GitHub and Git 2. Connecting Git and GitHub 3. Why use Git?

Installing GitHub If you haven t already, create an account on GitHub and install Git and GitHub desktop on your machine. https://git-scm.com/downloads https://desktop.github.com

Setting Up GitHub Once installed, you ll want to connect your GitHub desktop to your account. To do so in the desktop client, follow these steps 1. Click on GitHub desktop menu in the top left 2. Click Preferences 3. Select Accounts 4. Under GitHub.com click Sign In and add in your credentials 5. Voila!

Configure Git for GitHub Desktop This will connect your email to your GitHub for when you make commits. 1. Signin to GitHub (online) 2. Click on your profile picture (top right) and click on Settings 3. Click on Emails 4. Put in the email you want to use (probably your ND email!) 5. In your GitHub Desktop application, click on GitHub desktop menu in the top left 6. Click Preferences 7. Select Git 8. Make sure your Name and Email are filled in properly!

Why Use Git? Version Control! Ever create good code and then change something and everything breaks? Using GitHub allows you to revert back to when your code worked and shows you exactly what you changed to make it break! Also very useful for if you make multiple versions of the same code. This way you can see what your most recent version is compared to past versions. Allows you to determine what changes collaborators make on your code.

Git Repositories 1. What are they? 2. How to create them on GitHub 3. Connecting to Already Existing repos on GitHub

What is a Repository? A folder.

Creating Repos on GitHub On your homepage, click the green New repository button! ** ALWAYS click to Initialise this repository with a README This allows you to immediately clone the repository to your computer.

A blank repository on GitHub should resemble this!

Add a GitHub Repository to Your GitHub Desktop 1. Click the green Clone or Download button 2. Copy the link that appears to your clipboard 3. In the GitHub Desktop application, Click File 4. Click Clone Repository 5. Go to the URL tab and paste in the URL from your clipboard a. Note: you can change the local path to be where ever you want to store this repo 6. Now click Clone 7. KABLAM!

Interacting With Repos 1. Documenting Your Project 2. Pushing to GitHub 3. Pulling from GitHub

Documenting Your Project The key to success is to always document your projects. This can be as simple as creating a text file that declares what the project is, what it aims to do, and what your next steps. This is usually what the README file in GitHub is for!

Documenting Your Project 1. In Github Desktop, click on the blue link that says open this repository 2. In your local folder, open up your README.md file using your preferred text editor (Notepad, Notepad ++, Atom, TextWrangler, etc.) 3. Write a few lines- it can be literally anything since this is practice! And save your file! ** Note, these steps should also be followed for when you re adding new files. I.E. place your files to add inside this local folder when you want to add new files! Alternatively, brute force it and add the file directly using GitHub online **

Pushing to GitHub Back in your GitHub Desktop, you can see that it s reflecting these new changes in your MD file. You need to make sure that this changed file has a checkmark to the left of it like so. This yellow circle symbol indicates that changes were made that haven t been pushed yet.

Pushing to GitHub 1. Before you can push, aka upload this file to Github and merge it with the old one, you have to tell Git you want to do that (this is called adding and committing which are normally 2 separate steps if using the command line). This is accomplished by having that checkmark shown! 2. Now you need to fill in the summary or else you cannot push to Github. This is required so that GitHub can show why these changes occurred. This is useful for you to look back and see why you made certain changes in your code. Furthermore, you can then use this to go back to certain commits if your code every breaks. A more detailed description can be filled in, but is not necessary.

Pushing to GitHub 3. Click the blue Commit to master button when ready to merge online

Pushing to GitHub 4. Once you ve made the commit, now you can push your updated file on line. To do this, click where it says Push Origin in the top right of the Desktop application. 5. Now if you refresh your online GitHub repo, you ll see your new commit!

Pulling From GitHub This is only useful if you are working from multiple computers or with multiple collaborators. There are 3 ways to pull using GitHub Desktop, 1. clicking on the Fetch Origin button (which only appears if you have no commits pending) 2. by going into the Repository menu and clicking Pull 3. Using your machine s hotkeys (i.e. shift, command P for Mac).

Advice to Live By Forever At the beginning of every day, when you re about to work on a project that is hosted in GitHub, PULL! You never know which collaborator got inspired at 4am and made new commits online! At the end of every day, when you re about to stop working on a project hosted in GitHub, PUSH your changes to the online so that others know your progress and can work off it when they get inspired at 4 am. All of this avoids merge conflicts! *SCARY!* Don t be afraid of branching. It s just fancy talk for folders. And time. (like if everything is already good, and you want to add more but don t want to break the Master, that is the finalized product): good for coding new features

Interactions! Now stop sleeping, and try pulling your neighbor s/friend s GitHub projects. ** Try to figure out how to add one another as collaborators to the repo. If they aren t a contributor then they can pull and then make a push request which requires approve to finalize, not ideal if you re actually collaborating!**

Interactions! V 2.0! Now try forking another friend/neighbors repository. ** Discussion: What is forking? Benefits? Drawbacks? Problems with the name?**

Interactions! V 3.0! Now try forking another friend/neighbors repository. ** Discussion: What is forking? Benefits? Drawbacks? Problems with the name?**

Interactions! V4.0: On Stranger Tides (of topics) Try adding topics to your projects to make them easier to find! Issue tracking is useful for collaborators or non-collaborators to remark on bugs ( features ) and opens up discussion threads. Can be marked as resolved when the bugs have officially become features.