Introduction To GitHub

Slides:



Advertisements
Similar presentations
Introduction To GIT Rob Di Marco Philly Linux Users Group July 14, 2008.
Advertisements

1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
Fundamentals of Git By Zachary Ling 29 th, Aug,
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Git – versioning and managing your software L. Grewe.
Version control Using Git Version control, using Git1.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Git Michael Backherms. What is Git? Free Software Development Tool o Speedy tool for distributed revision control and source code management Designed.
Version Control. How do you share code? Discussion.
Version Control Systems academy.zariba.com 1. Lecture Content 1.What is Software Configuration Management? 2.Version Control Systems (VCS) 3.Basic Git.
…using Git/Tortoise Git
Git workflow and basic commands By: Anuj Sharma. Why git? Git is a distributed revision control system with an emphasis on speed, data integrity, and.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Sofia Event Center May 2014 Martin Kulov Git For TFS Developers.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Page 1 TBD 12/08/2014 Formation GIT Laurent Kappel Groupe SII 65, rue de Bercy Paris Tél : Fax :
Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit:
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
It’s not just an insult from Harry Potter!. What is Git? Distributed Version Control System (DVCS) – Compared to a Centralized Version Control System.
Information Systems and Network Engineering Laboratory I DR. KEN COSH WEEK 1.
Introduction to Git - Chirag Dani. Objectives Basics of Git Understanding different “Mindset of Git” Demo - Git with Visual Studio.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
Jun-Ru Chang Introduction GIT Jun-Ru Chang
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
Backing up a machine with git
GIT: (a)Gentle InTroduction Bruno Bossola. Agenda About version control Concepts Working locally Remote operations Enterprise adoption Q&A.
KIT – University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association STEINBUCH CENTRE FOR COMPUTING - SCC
Version Control Systems
CS5220 Advanced Topics in Web Programming Version Control with Git
4 Version control (part 1)
Information Systems and Network Engineering Laboratory II
Source Control Systems
I don’t git it! Source control management deep dive with tfvc and git
I Don’t Git It: A beginner’s guide to git Presented by Mathew Robinson
Version Control Systems
Git and GitHub primer.
11 Version control (part 2)
CReSIS Git Tutorial.
GIT AND GITHUB WORKSHOP
LECTURE 2: Software Configuration Management
Version Control.
Version control, using Git
CS5220 Advanced Topics in Web Programming Version Control with Git
Version Control System using Git
Software Engineering for Data Scientists
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
LECTURE 3: Software Configuration Management
SIG: Open Week 1: GitHub Tim Choh.
Getting Started with Git and Bitbucket
Version control with Git Part II
Git CS Fall 2018.
Version control with Git
Git started with git: 2018 edition
GitHub and Git.
Version Control with Git and GitHub
Git Fundamentals.
Git Introduction.
Introduction to Git and Github
Git GitHub.
Introduction to The Git Version Control System
Introduction To GitHub
Presentation transcript:

Introduction To GitHub August 03 2019 | SQL Saturday Louisville

About Me Senior Database Administrator at Republic Bank Independent Consultant Friend of Red-Gate Co-Chapter Leader of Louisville SQL Server and Power BI User Group

Contact Info Twitter : @CodeNameSQL GitHub: jhiggin Email: Joshua.Higginbotham@codenamesql.com

Topics for today Overview of Github Setting up your remote environment Working with git/github locally

Overview of GitHub

Facts about GitHub April 2005 February 2008 4 June 2018 Git is created by Linus Torvalds February 2008 GitHub is Founded 4 June 2018 Purchased on June 4, 2018 by Microsoft for the small sum of $7.5 billion in stocks. Facts about GitHub Git was created when the relationship between the company that made BitKeeper and the Linux communities relationship failed.

Octoverse Report - 2018 36M Registered Users 100M Repositories. 54% of the Fortune 50 use GitHub Enterprise 49% of the Fortune 100 use GitHub Enterprise Octoverse Report - 2018 Adoption of GitHub was early. Within the first year alone, 46,000 public repositories were created.

Source Control Types

Centralized version control A single ”Source of Truth” copy of your project. Some require a connection to the CVS system to be able to do things like committing changes or viewing history. Delta based commits. Suffers from the Mothership scenario from Independence Day.

Distributed Version control Source control will still live in a central location, but each individual client will clone a full copy of the project to their local machine. Protects you in the case of failure to the central server. Client based clones can still access history and commit changes off network and push at a later time. Snapshot based commits.

Setting Up Your Remote Environment

Feature Comparisons There are currently 4 plans available for use with GitHub. The below link will provide a comparison between the different plans. https://github.com/pricing#feature-comparison Free, Pro, Team, and Enterprise plans are available. Most day to day users will use the free plan which now allow unlimited private repositories as long as you remain under 3 contributors.

Setting up an Organization An organization is a way of grouping your repositories under one area. Prepares you for the "Getting hit by a bus" scenario.

Project Licensing https://choosealicense.com A License tells others what they are allowed to do with your source control and project. Due to this, it is important that you choose the right license for your project type. The below resources can be used to help you choose the best license for your project. https://choosealicense.com https://help.github.com/en/articles/licensing-a-repository Project licenses are a best practice standard. Without it, you allow people to do whatever they'd like with your code.

Initial Setup for Open Source Projects Common practice dictates that your project should include the following items. readme.md – Treated as a welcome page for your repo. Should give a broad overview of the project and instructions on how to interact with the repo and codebase. contributing.md – Instructions on how to contribute to the project. Whether it’s opening an issue, testing a new feature, or developing new code. This should be the place to route people on how to do so. Code_of_conduct.md – A code of conduct defines out what is expected of all contributors and visitors of the project. There are no exceptions to the policy and should be enforced to the T.

Securing Your Project Creating protected branches ensures that contributors to your source control project do not introduce detrimental changes to your code base. By default, any changes that have no conflict between the head and base branches can be merged. For additional info, please view the below resources. https://help.github.com/en/articles/about-protected-branches https://help.github.com/en/articles/about-code-owners

Securing Your Project (Continued) GitHub currently tracks public vulnerabilities in Ruby gems, NPM, Python, Java, and .net packages. By default, notifications are sent to project owners, but can be configured to go to other parties.

Securing Your Project (Continued) At times, there are certain files that you may not want included in your source control system. These files may contain items like sensitive credentials, server settings, or PII data. By utilizing a file called .gitignore, we can decide which files and directories to ignore when we commit our code to source control. The .gitignore file should be included in your source code project, that way it is pulled by an contributors to your project. Examples of .gitignore files can be located here: https://github.com/github/gitignore

Working with git/GitHub Locally

Setup and Initializing Commands Fork – Making a copy of a repository. This is commonly used when making changes to another person or groups repository or using their project as a starting point or template. Git Clone – Creates a local copy of a repository on your system and syncs between the local and remote locations. Git Init– Initializes an existing directory as a Git Repository.

Staging and Snapshot Commands Git Status – shows modified files in the current working directory. Git Add – adds a file or all files in a directory to stage for the next commit. Git Reset – unstages files while retaining the changes in the working directory. Git Diff – displays changes that have been made. Git Commit – Commits all stages changes as a new snapshot.

Branching and Merging Commands Git Branch – lists all of your branches for the current repo. Git Branch {Name} – Creates a new branch. Git Checkout – switches to another branch and checks it out into your working directory. Git Merge – merge the specified branch’s the history into the current branch. Git Log - shows all commits in the current branch’s history.

Share and Update Commands Git Remote Add – assigns a remote repo to a local repo. Git Fetch – pulls down all branches from the remote location. Git Push – Sends all local branch commits to the remote repository branch. Git Pull – Fetch and Merge any commits from the tracking remote branch.

Working States / Areas There are three states in which items can live locally in your Git Repo. Modified / untracked changes Staged Committed 1) Modified/Untracked and your Working Directory Git views untracked and modified files similarly. Untracked means that the file is new to your Git project. Modified means that the file has been seen before, but has been changed, so is not ready to be snapshotted by Git. Modification of a file occurs in your working directory. 2) Staged and Staging Area When a file becomes staged, it's taken into the staging area. This is where Git is able to take a snapshot of it and store its current state to your local repository. This area is also known as the Index. 3) Committed and the Git Directory Committed means that Git has officially taken a snapshot of the files in the staging area, and stored a unique index in the Git directory. The terms snapshotted and committed are very similar. The significance of being committed is that you can now revert back to this project's current state at any time in the future.

Branching A branch is a means to isolate development work from existing branches within your repository. Each repository has a default branch that acts as your primary source location for code and history. The best way of to visualize branching is with a tree. Your primary branch is your trunk and your code branches are the individual branches of the tree that all converge into the trunk.

Branching (Continued) This Photo by Unknown Author is licensed under CC BY-SA Visual representation of the Git Flow process. https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

Additional Resources Learn GitHub Branching: https://learngitbranching.js.org/ GitHub tutorials: https://lab.github.com/ GitHub cheat sheet: https://github.github.com/training-kit/downloads/github-git-cheat-sheet.pdf