1 Web Design Workshop DIG 4104c Spring 2014 Dr. J. Michael Moshell University of Central Florida Lecture 2: The git source control system www.redbugbblle.com.

Slides:



Advertisements
Similar presentations
An Introduction By Sonali and Rasika.  Required for the project  Show the versions of your code in the course of development  Show versions of your.
Advertisements

om om GIT - Tips & Tricks / git.dvcs git-tips.com
MBAC 611.  We have been using MS Access to query and modify our databases.  MS Access provides a GUI (Graphical User Interface) that hides much of the.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
Git A distributed version control system 23-Aug-15.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
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,
Getting Started with GIT. Basic Navigation cd means change directory cd.. moves you up a level cd dir_name moves you to the folder named dir_name A dot.
RMG Study Group Session I: Git, Sphinx, webRMG Connie Gao 9/20/
1 Working with MS SQL Server. 2 Objectives You will be able to Use Visual Studio for GUI based interactive access to a Microsoft SQL Server database.
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
With Mercurial and Progress.   Introduction  What is version control ?  Why use version control ?  Centralised vs. Distributed  Why Mercurial ?
Peter Ogden and Josh Levine.  Motivation  High level overview  Walk through the common operations  How not to break things (too badly)
Git – versioning and managing your software L. Grewe.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Drexel University Software Engineering Research Group Git for SE101 1.
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.
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
CVS – concurrent versions system Network Management Workshop intERlab at AIT Thailand March 11-15, 2008.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git Basics. Git stores data as snapshots of the project over time When commit Save all the files If files have not changed, point to the previous identical.
1 Web Design Workshop DIG 4104c Spring 2014 Dr. J. Michael Moshell and Mr. Jon Friskics University of Central Florida Lecture 4: SmartGit – A GUI Client.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
1 Web Design Workshop DIG 4104c Spring 2012 Dr. J. Michael Moshell and Mr. Adam Lenz University of Central Florida Lecture 6: Bitbucket
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
12 CVS Mauro Jaskelioff (originally by Gail Hopkins)
1 Web Design Workshop DIG 4104c – Lecture 5c Git: Branch and Merge J. Michael Moshell University of Central Florida giantteddy.com.
1 Getting Started with C++ Part 1 Windows. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Microsoft.
Lecture 2 Making Simple Commits Sign in on the attendance sheet! credit:
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.
Git How to 1. Why Git To resolve problems in lab exams (accidental deletions) Use existing Libraries with ease (Statistics and Computer) Prepare undergraduates.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
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
Version Control Systems
Version control and issue tracking options for IHE PCD
Information Systems and Network Engineering Laboratory II
Source Control Systems
L – Modeling and Simulating Social Systems with MATLAB
GIT AND GITHUB WORKSHOP
Setting up Git, GitBash, and GitHub
L – Modeling and Simulating Social Systems with MATLAB
Version Control overview
Sign in on the attendance sheet!
Version Control Systems
An introduction to version control systems with Git
Version Control with Git accelerated tutorial for busy academics
An introduction to version control systems with Git
Setting up Git, GitBash, and GitHub
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Git CS Fall 2018.
Version control with Git
Introduction to Version Control with Git
Introduction to Git and GitHub
Git started with git: 2018 edition
CMPE/SE 131 Software Engineering February 14 Class Meeting
Version/revision control via git
Introduction to The Git Version Control System
Advanced Git for Beginners
Presentation transcript:

1 Web Design Workshop DIG 4104c Spring 2014 Dr. J. Michael Moshell University of Central Florida Lecture 2: The git source control system

-2 - About git If you had this workshop once already, then you had an introduction to git. Bear with us. If you DIDN'T, then you may have experienced the concept but not the working system. So you gotta learn how to use it now. We're serious. en.wikipedia.org

-3 - Step 0: Set up MAMP or WAMP (Local Apache development environment) If you don't know how, a) ask your team mates or b) ask your lab instructor. GITtin' it on with git:

-4 - Step 1: Install GIT, from git-scm.com Do this before your lab, if possible. If you don't have a laptop, we will TRY to use the lab's computers... and your home desktop machine. But it's much more tedious.

-5 - Step 2: Become a habitual user of GIT WHY? Because a significant number of web design AND game design firms are now using this Version Control System Several competing logos are in circulation. and who's that brown dude eating trees?

-6 - Step 3: ( Look-Ahead) Learn how to use smartGit, a GUI client (next week) WHY? It has a better graphical display than ‘bare git’. But we want you to understand the command line interface first. Step 4: (Look-Ahead) Learn how to use bitbucket, an online shared git repository. (3 weeks away)

-7 - Where to get started? This is the best tutorial/explanation That I’ve found – and it’s free! A repository is (similar to) a database that remembers all the previous versions of all the files in a project.

-8 - Where to get started? This is the best tutorial/explanation That I’ve found – and it’s free! A repository is (similar to) a database that remembers all the previous versions of all the files in a project. It can 'remind' you of the changes you made. It can show you the lines of code that were changed.

-9 - Where to get started? This is the best tutorial/explanation That I’ve found – and it’s free! A repository is (similar to) a database that remembers all the previous versions of all the files in a project. It can 'remind' you of the changes you made. It can show you the lines of code that were changed. Most importantly, it can organize a team's work so that you don't destroy each others' work.

-10 - The Team model, with a central repository (old way of doing it)

-11 - The Distributed model, with local repositories

-12 - Our "beginner model", for Project 1 this part not used for Project One

-13 - The local-and-remote repository model Advantages of this model: You can work locally even if the network is unavailable. It's very fast You can 're-sync' later.

-14 - The mysterious HASH code (SHA-1) Every document has a 40 character "signature" computed from all of its characters. It is called a SHA-1 and looks like 24b9da aa493b52f8696cd6d3b00373 These are used as 'handles' for all documents (not file names) So every new version of a file has a new SHA-1. AND Any corruption of a file can be detected by recomputing SHA-1.

-15 - Three states of a code file: committed: (working copy == repository copy) modified: (working copy != repository copy) staged: ready for recommitment, after you tell us WHY (the 'index' keeps track of what's staged)

-16 - The basic workflow 1. Modify files in your working directory 2. "Stage" the files, adding snapshots to the 'index' (staging area) 3. "Commit" the files, adding explanation and saving to repository Here’s how you will get set up, and DO IT, in the lab.

-17 - Using the Command Line Interface (“Console”) On Mac:

-18 - Using the Command Line Interface (“Console”) On PC:You access the Run command by holding down the Windows logo key and pressing R.

-19 - OR you can use the ‘unix-like shell’ called Gitbash

-20 - Install Git Don't follow the 'from source' description in the text. Follow the instructions from your download site, at git-scm.com Lab Instructor will help if needed Customize your git: >git config --global user.name "John Doe" (use your name) >git config --global user.

-21 - Initialize your Repository 1. Copy my 3 example files from the course website into a directory titled 'project0', in your docroot (htdocs for MAMP, www for WAMP) 2. Also create a super simple HTML “hello world” file, And call it hello.html. 3. Using your console window, change directory (cd) to your project0 folder. (green=computer’s output) >cd /Applications/MAMP/htdocs/DIG4104c/project0

-22 - Looking Around >ls (or, if you’re using windows, >dir) earth.gifexample.dragdrop.html hello.html

-23 - >ls –la (I don’t know HOW to do this on PC Console. Use gitBash.) total 632 drwxr-xr-x 9 jmichaelmoshell admin 170 Jan 6 03:28. drwxr-xr-x 14 jmichaelmoshell admin 136 Jan 6 03:28.. drwxr-xr-x 4 jmichaelmoshell admin Dec 29 15:16 earth.gif drwxr-xr-x 4 jmichaelmoshell admin 1300 Jan 5 126:51 example.dragdrop.html 1 jmichaelmoshell admin 108 Jan 6 03:26 hello.html Note: The –la means "show hidden files and details". The files with a dot in front of their names are hidden from ls. The details include privileges, creator, owner, size, date, name.

-24 - Initialize the repository project0>git init Initialized empty Git repository in /Applications/MAMP/ htdocs/DIG4104c/project0/.git project0>ls -la total 632 drwxr-xr-x 9 jmichaelmoshell admin 170 Jan 6 03:28. drwxr-xr-x 14 jmichaelmoshell admin 136 Jan 6 03:28.. drwxr-xr-x 4 jmichaelmoshell admin 340 Jan 6: 03:35.git drwxr-xr-x 4 jmichaelmoshell admin Dec 29 15:16 earth.gif drwxr-xr-x 4 jmichaelmoshell admin 1300 Jan 5 126:51 example.dragdrop.html 1 jmichaelmoshell admin 108 Jan 6 03:26 hello.html

-25 - Initial Commit >git add * >git commit –m 'Initial project version’ [master (root-commit) dda0064] Initial project version 3 files changed, 67 insertions(+) create mode earth.gif create mode example.dragdrop.html create mode hello.html

-26 - Initial Commit >git add * >git commit –m 'Initial project version’ [master (root-commit) dda0064] Initial project version 3 files changed, 67 insertions(+) create mode earth.gif create mode example.dragdrop.html create mode hello.html If you omit the commit message git will open an editor. You won’t like it...

-27 - Edit ‘hello.html’. Previous version just had Hi there world! New version adds Adding some body text I saved it, so now the working directory does not match the repository.

-28 - Compare workspace to committed version >git diff JMMairBook:Project0 jmichaelmoshell$ git diff diff --git a/hello.html b/hello.html index fa40afe..ea0287b a/hello.html +++ b/hello.html -5,5 +5,6 Hi there world! + Adding some body text

-29 - Add hello.html to the staging area >git add hello.html >// no message here; it's just staged >git status # On branch master # Changes to be committed: # (use "git reset HEAD..." to unstage) # #modified: hello.html #

-30 - Commit the change >git commit –m 'Added body text.' [master 53ad16a] Added body text. 1 file changed, 1 insertion(+)

-31 - Look at the log of changes >git log commit 53ad16afe185db2dec9c95ef4e4cfe01e0befc41 Author: Mike Moshell Date: Sun Aug 26 16:13: Added body text. commit bb39112feb93c bf5cb0f74af Author: Mike Moshell Date: Sat Aug 25 14:54: Initial project version The log is in reverse chronological order (newest first)

-32 - In the Lab, you will repeat this “Warm-up” procedure on hello.html and then... Begin creating, staging and committing your code for Project 1... WHICH is our next topic.