BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.

Slides:



Advertisements
Similar presentations
Version Control Systems Phil Pratt-Szeliga Fall 2010.
Advertisements

Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
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.
Git Intro Information mostly from Pro Git. Prepare  Start Eclipse, we have a 5-minute exercise later.
BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git.
Distributed Version Control. Image stolen from which is really good, go read it.  Old-school version control.
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.
RMG Study Group Session I: Git, Sphinx, webRMG Connie Gao 9/20/
علیرضا فراهانی استاد درس: جعفری نژاد مهر Version Control ▪Version control is a system that records changes to a file or set of files over time so.
Version Control with Subversion Quick Reference of Subversion.
A primer on version control at OTN
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.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
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.
…using Git/Tortoise Git
SWEN 302: AGILE METHODS Roma Klapaukh & Alex Potanin.
Information Systems and Network Engineering Laboratory II DR. KEN COSH WEEK 1.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
Git Fundamentals Rochelle Terman 13 January 2014.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
1 GIT NOUN \’GIT\ A DISTRIBUTED REVISION CONTROL AND SOURCE CODE MANAGEMENT (SCM) SYSTEM WITH AN EMPHASIS ON SPEED. INITIALLY DESIGNED AND DEVELOPED BY.
A Simple Introduction to Git: a distributed version-control system CS 5010 Program Design Paradigms “Bootcamp” Lesson 0.5 © Mitchell Wand, This.
Version Control System Lisa Palathingal 03/04/2015.
Intro to Git presented by Brian K. Vagnini Hosted by.
Version Control and SVN ECE 297. Why Do We Need Version Control?
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
Using Git with collaboration, code review, and code management for open source and private projects. & Using Terminal to create, and push commits to repositories.
Git workflows: using multiple branches for parallel development SE-2800 Dr. Mark L. Hornick 1.
Git A distributed version control system Powerpoint credited to University of PA And modified by Pepper 28-Jun-16.
Getting Started with Git Presented by Jim Taylor Rooty Hollow, Owner Verizon Wireless, Senior Programmer/Analyst Git User for 6 years.
GIT Version control. Version Control Sharing code via a centralized DB Also provides for Backtracking (going back to a previous version of code), Branching.
CS5220 Advanced Topics in Web Programming Version Control with Git
Git primer Landon Cox January 19, 2017.
Information Systems and Network Engineering Laboratory II
11 Version control (part 2)
Version Control overview
A Simple Introduction to Git: a distributed version-control system
Version Control System
An introduction to version control systems with Git
Distributed Version Control with git
Akshay Narayan git up to speed with RCS Akshay Narayan
An introduction to version control systems with Git
Source Code Management
Version Control with git
BIT 286: (Web) Application Programming
An introduction to version control systems with Git
Getting Started with Git and Bitbucket
Git CS Fall 2018.
Version control with Git
Git started with git: 2018 edition
Version Control with Git and GitHub
Version/revision control via git
Introduction to Git and Github
Git GitHub.
1. GitHub.
Introduction to The Git Version Control System
Using GitHub for Papyrus Models Jessie Jewitt – OAM Technology Consulting/ ARM Inc. January 29th, 2018.
Presentation transcript:

BIT 285: ( Web) Application Programming Lecture 07 : Tuesday, January 27, 2015 Git

Coding In A Group: Best Practices  What’s in the repository always works  Modulo bugs, of course  Do test while developing  So you’ll check in a completed feature and the tests for it  This might mean checking in a document with a checklist to manually verify  Do NOT develop the code and then go back for a 'QA' phase!!  These are required for this class! 2

What is version control? (and what's up with git?)  Let's look at pictures!   States States 3

Using Git  CVS  overview - single, centralized storage  Tracks source code files well (.txt files), can handle binary files (images, etc.)  Git  overview (decentralized, but can function as centralized)  Follow the tutorial  create rep  add stuff  commit  change, commit  push back to BitBucket 4

Starting out  Download Git from  git started out as a command-line tool, and the GUI hasn't had a good rep for a while.  Most of these instructions will be for the command line tool, but you can do the same stuff in the GUI.  To Create a local / personal repository:  Start a command prompt  cd path/to/project  git init  git add.  git status  git config --global user.  git commit –m "Checkin message here, for your teammates to know what you've done"  Alternately, you can go to a place like GitHub.com, or BitBucket.com, and create a Git project there.  Each website has it's own directions (they should all be pretty similar)  From Intro To Git For Web DesignersIntro To Git For Web Designers 5

Typical Individual Workflow  Work on the files  It's easy to discard you changes and roll back to the last thing that you committed  Stage the files (and add any new files)  git add –A will add new files, and get modified files ready to be added.  Commit your changes  git status will show you git's view of the world  git commit to officially update your local copy (and ONLY your local copy).  You need to include a note about what you've done (git commit –m "Fixed bug #65304" )  Now it's easy to roll back to this point  Git makes it quick & easy to do this, so think about "checking in" as more like "making a backup"  The backup has a name & is listed in git's history of your project in case you want to go back to it.  From Intro To Git For Web Designers and To Git For Web Designers 6

Exercises #1  Zeroth, install git  First, mess around with a disposable local repository  Create it  Add a file and commit it  Change the file and commit it  Figure out how to list the history 7

Thinking about your files  The basic Git workflow:  Modify files in the directory.  Stage the files (adds snapshots of files to git's "staging area")  Commit (take staged snapshots & store permanently)  From Git-Basics#The-Three-Stateshttp://git-scm.com/book/en/v2/Getting-Started- Git-Basics#The-Three-States 8

Typical Workflow – GUI  You can do all this in the GUI, too, although the GUI isn't as intuitive as I'd like  The GUI focuses on managing your next commit  As opposed to showing you what's in the file system (Repository  Explore Working Copy)  More info at Interfaceshttp://git-scm.com/book/en/v2/Git-in-Other-Environments-Graphical- Interfaces 9

git is ok with files that aren't part of your project 10 It's worth noting that you can tell git to ignore files "Project\Views\Someting\Index.cshtml" All.exe files Etc These will be left 'untracked', and the GUI won't show them

Branches  Easy, quick branches are one of git's strengths  You may (or may not) use it, but it's good to know about it.  I recommend that you not use it until you get more comfortable with git  Let's walk through in-a-Nutshellhttp://git-scm.com/book/en/v2/Git-Branching-Branches- in-a-Nutshell  Visualizer to help you understand this: with-d3/#checkouthttp://onlywei.github.io/explain-git- with-d3/#checkout 11

Working In A Group: Centralized Workflow  Single, shared, "master" repository  Pull the most recent changes from there, push your work back to it  YOU ARE REQUIRED TO USE THIS MODEL IN THIS CLASS!  Pro Git: Distributed Workflows Pro Git: Distributed Workflows 12

Working In A Group: Details  Workflow: pull, { work/change, commit }, push  git pull  This will get the most 'master' version from the central repository, and integrate it into your local copy  WARNING: If you pull down the most recent copy and it's broken (doesn't compile, or doesn't run correctly) then you'll but stuck until it's fixed (or until you back the changes out – until you undo them).  This is why it's so important that the 'master copy' ALWAYS WORKS   git push  Upload your work back to the central, master copy  From Intro To Git For Web DesignersIntro To Git For Web Designers 13

Let's examine how this will work  Pro Git: Contributing (Small team model) Pro Git: Contributing (Small team model)  (There's an image at the end that sums this up – start there) 14

Exercises #2  Second, have someone on your team create a shared repository  Each person then does a git pull to pull down a copy  ADD A NEW FILE, with a unique name (maybe using your own name?)  Commit it  push your changes back to the repository  You may need to pull the most recent changes if someone pushed before your did  Modify your file, commit it, push the changes back to the repository  Third, find out what happens when you step on each other's toes   Fetch the repository (if you haven't already) to get their file, change their file locally, commit locally  Have them do the same – change their file  One at a time, push back to the repository (second pusher will need to merge changes)  Do this again, but have the other person go second 15