CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.

Slides:



Advertisements
Similar presentations
Github. Download & install git   Git bash  Git GUI.
Advertisements

Hosted Git github. From an alumni (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for the.
Using svn and git with Unity and sdk
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.
1 CSE 390 “Lecture 11” Version control with Git slides created by Ruth Anderson, images from
Introduction to Git and Github Joshua imtraum.com.
Git for Version Control These slides are heavily based on slides created by Ruth Anderson for CSE 390a. Thanks, Ruth! images taken from
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.
Version control Using Git 1Version control, using Git.
Chapter - 2 What is “GIT” VERSION CONTROL AND GIT BASICS.
Introduction to Version Control with SVN & Git CSC/ECE 517, Fall 2012 Titus Barik & Ed Gehringer, with help from Gaurav.
علیرضا فراهانی استاد درس: جعفری نژاد مهر 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 ?
Git – versioning and managing your software L. Grewe.
GIT An introduction to GIT Source Control. What is GIT (1 of 2) ▪ “Git is a free and open source distributed version control system designed to handle.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 8-Oct-15.
Version control Using Git Version control, using Git1.
Git (Get) it done right! Practical Applied Version Control for Drupal site developers Peter Chen - Stanford School of Engineering Technical Webmaster.
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.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Introduction to GitHub Alex Bigazzi Dec. 4, 2013 ITS Lab GitHub Introduction1.
QUICK START OF GITHUB Lin Shuo-Ren 2013/3/6 1. Why We Should Control The Version Although it rains, throw not away your watering pot. All changes should.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
Version Control System Lisa Palathingal 03/04/2015.
GIT.
Intro to Git presented by Brian K. Vagnini Hosted by.
Introduction to Git Yonglei Tao GVSU. Version Control Systems  Also known as Source Code Management systems  Increase your productivity by allowing.
Hosted Git github. From an alumnus (2010)  You know, the more time I spent in industry the better I've understood what a strong advocate you are for.
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.
Technical Presentation by: David Spano. About Git (VCS) Simple Git Commands Branching Github Git GUI Summary.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
CS102 Basic Computer Science and Programming Assoc. Prof. Jens Allmer Teaching Assistants: Canan Has, Caner Bağcı.
Installing git In Linux: sudo apt-get install git In Windows: download it from run the setuphttp://git-scm.com/download/win.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
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.
Version Control Systems
Version control and issue tracking options for IHE PCD
CS5220 Advanced Topics in Web Programming Version Control with Git
M.Sc. Juan Carlos Olivares Rojas
Information Systems and Network Engineering Laboratory II
L – Modeling and Simulating Social Systems with MATLAB
Git and GitHub primer.
Version Control.
L – Modeling and Simulating Social Systems with MATLAB
Version Control overview
Version control, using Git
Version Control System using Git
Development and Deployment
Version Control Systems
Storing, Sending, and Tracking Files Recitation 2
An introduction to version control systems with Git
Version Control with Git accelerated tutorial for busy academics
Distributed Version Control with git
An introduction to version control systems with Git
(Advanced) Web Application Development
The Big Picture
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Using Github.
Git CS Fall 2018.
Version control with Git
CMPE/SE 131 Software Engineering February 14 Class Meeting
Version/revision control via git
Git GitHub.
Presentation transcript:

CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State University Spring 2016 Instructor: Ron Mak

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Teams? 2

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 3 Version Control System  Version control is important when you’re working on a software project over time. Many source and documentation files. The files change during development. You need to keep track of the different versions of each file, and possibly roll back to an earlier version.  A version control system (VCS): Records changes to your files over time. You can recall specific versions later.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 4 Version Control System, cont’d  A VCS is critical for a multi-person project.  How do you keep developers on a team from overwriting each other’s changes?  How do you roll back to an earlier version of a file after deciding that the latest changes were bogus?  Who has the latest and greatest version of the source files?

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 5 Local Version Control  You keep track of the different versions of a file. By name, such as MyClass.java, Myclass- old.java, MyClass-even-older.java, etc. By creating “time-stamped” subdirectories such as src-feb20, src-feb21, etc. and putting source files in them. Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 6 Centralized Version Control  A server keeps track of all the file versions in a central repository. Developers working on different computers “check out” files from the repository, modify them locally, and then “check in” the files back into the repository. What if the network goes down? Poor performance due to network delays. CVS Subversion Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 7 Distributed Version Control  Each developer has a complete local copy of the repository. How do you keep all the local copies synchronized? Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Git  Originally developed by Linus Torvalds. Creator of Linux. “I’m an egotistical bastard, and I name all my projects after myself. First Linux, now git.”  git = British term for a silly or worthless person  “Global Information Tracker”  Extremely popular in industry and academia. For example, used by NASA. 8

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 9 Git, cont’d  Incredibly fast.  Simple design.  Strong support for non-linear development. Thousands of parallel branches.  Fully distributed. Each developer has a complete copy of the repository.  Very efficient with large projects such as the Linux kernel.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 10 Git: File Differences vs. Snapshots Differences (Subversion) Snapshots (Git) Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 11 Git: Local Operations  Each developer has a complete local copy of the repository on his or her laptop or workstation.  Local operations add commit check in check out status differences etc.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 12 Git: Remote Operations  Do remote operations only when necessary to the master repository on the server. Clone the master repository into a local repository. Push (and merge) a local repository up to the master repository. Pull (and merge) files from the master repository down to a local repository.  Git can work peer-to-peer without a master repository.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 13 Local and Remote Repositories LOCAL SuperCoder’s master repo Susan’s local repo Fred’s local repo pull push REMOTE add, commit, etc.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 14 Git: Three File States  A file can be in one of three states: modified staged committed Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 15 Git: Three File States, cont’d  The hidden Git directory.git is the local project repository.  The working directory is where you check out a version of the project for you to work on.  The staging area is a file that keeps track of what will go into your next commit. The staging area is also known as the “index”. Pro Git by Scott Chacon Apress, 2009

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub  GitHub is a popular website for hosting remote Git repositories. The free service hosts public repositories. Anyone can view your repository contents. 16

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 17 GitHub: Create Personal Account  Go to Download and install Git on your local machine.  Go to Create a personal account with a recognizable user name such as johndoe or jdoe.  Set up SSH keys to establish a secure connection with GitHub. See

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 18 GitHub: Create Team Repository  One team member creates the team’s master repository at GitHub See Initialize the repo with a README file. Possible ways to get private git accounts: BitBucket (another git server) education.github.com (get a free private GitHub account)

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 19 GitHub: Create Team Repository, cont’d  Obtain the GitHub username of each team member.  Add team members as contributors to the team repository. Click Settings in the right side panel. Click Collaborators in the left Options panel. Add collaborators using each team member’s GitHub username.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub: Create Local Repository  Each team member creates local repository that is a clone of the master repository. Log into your personal GitHub account. Search for your team’s master repository by name in the search box at the top. Click on the link to the team repository.  Obtain the URL to the team repository. On the team repository page, look for HTTPS clone URL in the right side panel. Put the URL on the clipboard. 20

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub: Create Local Repository, cont’d 21

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub: Create Local Repository, cont’d  cd to the directory where you want the local repository to reside on your local machine.  Enter the git command where URL is the URL from the clipboard Example: 22 git clone git clone URL

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 23 Git: Make Local Changes  Get the status of files in your local repository:  After you’ve modified files (or created new files) on your local machine, first add them to the local staging area:  Commit your staged files to the local repository: git status git add myfile1 myfile2 git commit –m "commit message"

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Git: Already Have Local Files?  If you already have a local directory of files: cd to the directory and then do to create a local repository. Do git add to enter each file into the local repository, followed by git commit. 24 git init

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Git: Push to the Master Repository  From the directory of the local repository, push your local repository contents up to the master repository at GitHub.  If another team member had pushed the same files since you last obtained them from the master repository, or added new files, you’ll have to pull down the changed or new files in order to merge them into your local repository before you can push. 25 git push git pull

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak 26 Git Tutorials and References  Tutorial:  Pro Git book online: Chapter 5 Distributed Git is especially helpful. Especially tricky topics: branching and merging.

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub: Repository Statistics  A repository’s overall work statistics are public. 27

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak GitHub: Repository Statistics, cont’d  An individual team member’s work statistics are public. 28

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak SmartGit GUI-Based Git Interface  See: 29

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Deployment to Heroku  You need to deploy your application to the Web.  Deploy to Heroku. A cloud application platform Platform as a Service (PaaS).  Sign up for a free account Create a team account  Install the Heroku Toolbelt 30

Computer Science Dept. Spring 2016: February 16 CS 160 and CMPE/SE 131: Software Engineering © R. Mak Deployment to Heroku, cont’d  Follow the Rails book’s instructions: Install the PostgreSQL gem pg. Install the Heroku gem rails_12factor Create an application on Heroku Set up a remote git account on Heroku Push your local master branch to Heroku Create your database on Heroku  An example deployment of the blog application 31