Version control. what is version control? setting up Git simple command-line usage Git basics

Similar documents
Git & Github Fundamental by Rajesh Kumar.

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

FEEG Applied Programming 3 - Version Control and Git II

Barry Grant

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

A Plumber s Guide to Git Alex

Git Introduction CS 400. February 11, 2018

School of Computing Science Gitlab Platform - User Notes

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

Introduction to Git and Github Repositories

Version Control: Gitting Started

Basics of Git GitHub

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

Salvatore Rinzivillo VISUAL ANALYTICS

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

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

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

Software Development I

Windows. Everywhere else

Warmup. A programmer s wife tells him, Would you mind going to the store and picking up a loaf of bread? Also, if they have eggs, get a dozen.

git the SCM system Jan-Simon Möller training.linuxfoundation.org

Version Control Systems

Assumptions. GIT Commands. OS Commands

Version Control. Version Control

Human-Computer Interaction Design

What is Git? What is Git? Version Control. Barry Grant

Version Control. Software Carpentry Github s Hello World Git For Ages 4 And Up You need source code control now

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

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


Section 2: Developer tools and you. Alex Mariakakis (staff-wide)

Git: Distributed Version Control

Version Control with Git

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

Chapter 5. Version Control: Git

Version control with Git.

Software Revision Control for MASS. Git Installation / Configuration / Use

Human-Computer Interaction Design

Eugene, Niko, Matt, and Oliver

Git. Presenter: Haotao (Eric) Lai Contact:

Tips on how to set up a GitHub account:

L Modeling and Simulating Social Systems with MATLAB

Index. Alias syntax, 31 Author and commit attributes, 334

Version control system (VCS)

Outline. Version Control System (VCS) basics Git terminology & concepts Basic Git commands Branches in Git Git over the network (time permitting)

Git: Distributed Version Control

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31

Version control CSE 403

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

Introduction to Version Control using Git

Lab Exercise Git: A distributed version control system

Git tutorial. Katie Osterried C2SM. October 22, 2015

Lecture 01 - Working with Linux Servers and Git

Version Control Systems (Part 1)

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

A Brief Git Primer for CS 350

How to be a git. Dominic Mitchell

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

Hg Tutorial. For : COP Object oriented Programming (Using C++) Biswas Parajuli

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko

Submitting your Work using GIT

Version Control with Git

(Cloud9) and to the Remote Repository (GitHub)

Object Oriented Programming. Week 1 Part 2 Git and egit

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies

Θερινό Σχολείο, Ιουλίου git. Αχιλλέας Πιπινέλης. Μονάδα Αριστείας ΕΛ/ΛΑΚ ΤΕΙ Αθήνας

AMath 483/583 Lecture 2

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

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

AMath 483/583 Lecture 2. Notes: Notes: Homework #1. Class Virtual Machine. Notes: Outline:

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Effective Software Development and Version Control

How to version control like a pro: a roadmap to your reproducible & collaborative research

Intro to Linux & Command Line

Version Control with Git ME 461 Fall 2018

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

Version Control System - Git. zswu

How to be a 1337 h4ck3r: Git + Linux

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

A BASIC UNDERSTANDING OF VERSION CONTROL

TDDC88 Lab 4 Software Configuration Management

Revision Control and GIT

Version Control with GIT

Week 5. CS 400 Programming III

Git for Version Control

Using git to download and update BOUT++

John DeDourek Professor Emeritus Faculty of Computer Science University of New Brunswick GIT

GETTING TO KNOW GIT: PART II JUSTIN ELLIOTT PENN STATE UNIVERSITY

Introduction to Version Control

Introduction to the UNIX command line

Git! Fundamentals. IT Pro Roundtable! June 17, 2014!! Justin Elliott! ITS / TLT! Classroom and Lab Computing!! Michael Potter!

Revision control. INF5750/ Lecture 2 (Part I)

Using GitHub to Share with SparkFun a

Version control CSE 403

Configuring Git. Matthieu Moy. configuring-git-slides.

Getting the Source Code

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

Source Code Management wih git

Transcription:

Version control what is version control? setting up Git simple command-line usage Git basics

Version control - intro ensure we keep track of changes, updates, contributions, suggested mods... could try old, and error-prone, tracking of directories etc version control tool such as Git coding style known as exploratory coding researching, learning, checking what does and does not work correctly... often used methodology for coders, and small groups as well can lead to many changes and updates in code

Version control - what is version control? very basic form of version control used on a regular basis copying, replicating folders, documents etc compare updates between old and new copies & revert back to older version very basic form of version control software development version control maintain defined, labelled points in our code easily refer back to them or revert to an earlier state if needed important tool for collaborative work with other developers number of different, and popular, version control tools over the last few years Subversion, Mercurial, Git... by 2010 Subversion held approximately 33.4% of the market for version control Git is believed to have only held approximately 2.7%, and Mercurial a paltry 0.7% by 2013, Git usage was almost as high as Subversion, and it continues to grow in popularity Git's popularity largely due to preference for distributed version control Atlassian's switch from Subversion to Git in 2012 also helped

Image - Version control usage (2010-2013) Source - RedMonk

Image - Version control change in usage (2010-2013) Source - RedMonk

Version control - setting up Git simple installers available for Git choose platform's installer from git follow simple instructions to install full install instructions for various Linux distributions git - Linux downloads for Debian/Ubuntu based APT distributions apt-get install git

Version control - Git GUIs many GUIs available for working with Git Git GUIs including specific GUIs for GitHub GitHub desktop clients still beneficial and quicker to work with command-line quick and easy to navigate files, directories... work with Git and version control in general

Image - OS X Terminal application

Command-line - Navigating directory and files A few examples pwd check the current directory (pwd = print working directory.) check the contents of the current directory (lists working directory) ls cd this command allows us to change directory in the working directory, we can create a new directory mkdir

Image - Command-line examples

Git basics - Part 1 Configure user/developer details set details for username and user email global flag can set these details for all work within our local instance of Git git config --global user.name "424dev" set preferred email address git config --global user.email "424dev@gmail.com" override for a specific repository in Git by omitting --globalflag git config user.name "424dev-single" and the same principle applies for email. check correct username for current repository git config user.name

Git basics - Part 2 Tracking projects start tracking project with Git create new working directory (eg: at rootof our home directory) cd ~/ ensures we have changed to our home directory. Then check working directory, pwd and then make a new directory for our client-side development. mkdir client-dev

Image - creating a client-dev directory

Git basics - Part 3 Add version control using Git to working directory initialise our new repository in the working directory git init check hidden.gitdirectory has been created ls -a and show contents of the.gitdirectory ls.git

Image - Initialise new Git repository

Git basics - Part 4 Start using our new repository create an initial index.htmlfile in project's working directory create using preferred text editor or command-line, eg: touch index.html save new file, and check Git is correctly tracking our project git status outputs current status of working branch, defaults to master outputs we have untracked files files will include new index.html add any new untracked file/s git add index.html or git add * for all untracked files.

Image - Git status and add

Git basics - Part 5 After adding our new index.htmlfile to the repository, we can commit these changes to the initial state of the repository. We use the following command git commit -m "initial commit index.html" -mflag permits useful message for commit message added within quotation marks should be useful and present tense

Image - First commit and message

Git basics - Part 6 initial commit has saved a defined point in our work one we can revert to if needed check git statusand there should be nothing else to commit working directory should be clean Git has set our files ready for tracking repeat this process as we make further changes and updates freeze defined points within our project check recent commits, and view a record git log

Git basics - Part 7 Git revisions we've seen Git's simple linear commits presumes file has one parent child commits detail this linear revision of content a Git commit can store multiple parents and children eg: commit history might include revisions to a single file addition or deletion of new files merging of files to different branches further additions...

Git basics - useful commands Git command git config user.name "..." git config --global user.name "..." git config user.email "..." git config --global user.email "..." git init git status git add "..." git add * git commit -m "..." git log Expected Outcome sets username for current repo sets username for all repos (unless overridden per repo) sets user's email address for current repo sets user's email address for all repos (unless overridden per repo) initialise a Git repository in the current working directory output current status of repo in current working directory define specific file in current repo for next commit define all files in current repo for next commit commit defined files (set using git add) with message output commit history for current repo