1 Web Design Workshop DIG 4104c – Lecture 5c Git: Branch and Merge J. Michael Moshell University of Central Florida giantteddy.com.

Slides:



Advertisements
Similar presentations
Version Control CS440 – Introduction to Software Engineering © 2014 – John Bell Based on slides prepared by Jason Leigh for CS 340 University.
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
By Steven Campbell and Erik Boone.  Sharing projects by putting them into a central repository.  Checking out copies of projects from the repository.
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 Web Design Workshop DIG 4104c Spring 2014 Dr. J. Michael Moshell University of Central Florida Lecture 2: The git source control system
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
Git. What’s Git? A British swear A Distributed Version Control System Developed in 2005 by Linus Torvalds for use on the Linux Kernel Git Logo by Jason.
Version control with Github August 26th, 2014 Daniel Schreij VU Cognitive Psychology departement
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 ?
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.
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 (Get) it done right! Practical Applied Version Control for Drupal site developers Peter Chen - Stanford School of Engineering Technical Webmaster.
Drexel University Software Engineering Research Group Git for SE101 1.
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.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Team 708 – Hardwired Fusion Created by Nam Tran 2014.
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 Web Design Workshop DIG 4104c Spring 2012 Dr. J. Michael Moshell and Mr. Adam Lenz University of Central Florida Lecture 6: Bitbucket
Teacher Web Page Creation Eileen Musselman. Log on to Muhlenberg’s Intranet Click Submit button.
1 © 2015 Albion College | BUGMI 2015 Git’s Architecture And How It Relates to Banner Eddie Bachle Albion College September 25, 2015.
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.
WinCVS Training è Basic Concepts è Download & Setup è Importing a new module into CVS Repository è Getting new module from CVS è Getting Latest version.
© 2015 by Herb Holyst Introduction to git Cytomics Workshop December, 2015.
CS 160 and CMPE/SE 131 Software Engineering February 16 Class Meeting Department of Computer Science Department of Computer Engineering San José State.
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.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
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.
Thanks to our Sponsors! Community Sponsor Yearly Sponsor Marquee Sponsor.
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.
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
M.Sc. Juan Carlos Olivares Rojas
Version Control CS These slides were created by Kevin Schenk, BS in Computer Science, Purdue University, 2012.
11 Version control (part 2)
SVN intro (review).
Version Control.
Git Practice walkthrough.
CS/COE 1520 Recitation Week 2
Version control, using Git
Development and Deployment
Software Engineering for Data Scientists
Macaualy2 Workshop Berkeley 2017
Akshay Narayan git up to speed with RCS Akshay Narayan
The Big Picture
SIG: Open Week 1: GitHub Tim Choh.
Getting Started with Git and Bitbucket
Part 1: Editing and Publishing Files
Using Github.
Git CS Fall 2018.
Version control with Git
Version Control with Git
Git 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:

1 Web Design Workshop DIG 4104c – Lecture 5c Git: Branch and Merge J. Michael Moshell University of Central Florida giantteddy.com.

-2 - Steps toward grokking it 1. ONE worker. Branch and merge in local repo. Alice 2. ONE worker. Creating a remote repo; clone and push 3. TWO workers. Bob clones Alice's remote repo 4. TWO workers. Bob creates a branch and modifies it 5. TWO workers. Bob synchronizes his work with Alice

-3 - What you should understand when we're done: meaning of master, origin, HEAD, branch meaning of 'check out' how to read and understand Branch Diagrams Concepts about how SmartGIT represents branches The issue of Merging (but not (yet) how to resolve conflicts)

-4 - What I hope you will understand, but we're not there yet: Hands-on ability to fluently use SmartGit and bitbucket to manage team projects where merging is concerned. We will continue to gain experience with it, as the semester proceeds.

-5 - STEP 1: Branch Diagrams Helpful tutorial is at Alice creates & commits the initial site (version A). Then makes some mods and commits (version B). A | master

-6 - Branch Diagrams Helpful tutorial is at Alice creates & commits the initial site (version A). Then makes some mods and commits (version B). A | master A -- B | master

-7 - Master == deployed, testing == development Now Alice wants to add pandas to her site. She creates a new branch for testing. git branch testing A -- B | master testing

-8 - Master == deployed, testing == development Now Alice wants to add pandas to her site. She creates a new branch for testing. git branch testing A -- B | master testing

-9 - Master == deployed, testing == development Now Alice wants to add pandas to her site. She creates a new branch for testing. git branch testing A -- B | master testing git checkout testing

-10 - checkout: copy repo into working tree The green triangle denotes the HEAD, which is the version of the repo that has been copied into the working tree (directory). A -- B | master testing git checkout testing

-11 - Working on the testing branch We now add pandas to the testing branch, creating version C. A -- B -- C | master testing The green item in the branch  diagram is referred to as HEAD. It's what is currently in the working tree (directory) In SmartGit, marked by

-12 - Working on the testing branch We add an image named panda.png, and also another source file, pandashop.html.

-13 - Working on the testing branch We select the pandashop.html and panda.png and commit them, forming version D.

-14 - Working on the testing branch We select the pandashop.html and panda.png and commit them. Also commit the change to teddyshop.html, forming version D. A -- B -- C -- D | master testing DCBA DCBA

-15 - Adding a Tag (like a "comment") Open the log for teddy.html, highlight the master branch (later, it's gonna move) and  add a tag (by using this button.) A -- B -- C -- D | master testing

-16 - Now let's merge the testing branch into the master branch. First: go to Files view (so you can see the Branches menu) then open Branch Manager. Select master. Click the merge icon. A -- B -- C -- D | master testing

-17 - Merge what? Look at your choices, via this button. A -- B -- C -- D | master testing

-18 - Merge 'fast-forwarded' the master branch. A -- B -- C -- D | master testing Now you would use FTP to copy your working tree to your host.

-19 - STEP 2: Push to Bitbucket

-20 - STEP 2: Push to Bitbucket

-21 - STEP 2: Push to Bitbucket OK, so how do I do that from SmartGIT? Select the Files window (not a Log), then...

-22 - STEP 2: Push to Bitbucket

-23 - STEP 2: Push to Bitbucket

-24 - STEP 2: Push to Bitbucket You created your security key and passphrase in labsheet 4

-25 - STEP 2: Push to Bitbucket A -- B -- C -- D | master testing Bitbucket: origin

-26 - STEP 2: Push to Bitbucket A -- B -- C -- D | master testing Bitbucket: origin

-27 - STEP 2: Push to Bitbucket A -- B -- C -- D | master testing Bitbucket: origin

-28 - STEP 2: Push to Bitbucket A -- B -- C -- D | master testing Bitbucket: origin

-29 - STEP 2: Push to Bitbucket Bitbucket: origin A -- B -- C -- D | master testing

-30 - STEP 3: Log in via my PC, pretend to be another user, clone the repo. Bitbucket: origin A -- B -- C -- D | master testing A -- B -- C -- D | master testing Bob clones Alice's bitbucket repo

-31 - STEP 4: Bob creates a branch 'bobranch' and modifies pandashop.html (See pandabob.doc for this part) Bitbucket: origin A -- B -- C -- D | master testing A -- B -- C -- D - E | master testing bobranch

-32 - STEP 5: Merging the results at bitbucket Bitbucket: origin A -- B -- C -- D | master testing A -- B -- C -- D - E | master testing bobranch A -- B -- C -- D - E | master testing bobranch

-33 - STEP 5: Merging the results at bitbucket Now there's a new branch  and Alice wants it.

-34 - STEP 5: Alice does a pull via her SmartGIT Yes, we want  to merge what we pull And the results...

-35 - Bitbucket: origin A -- B -- C -- D -- E | master testing bobranch A -- B -- C -- D - E | master testing bobranch A -- B -- C -- D - E | master testing bobranch

-36 - STEP 5: Alice does a pull via her SmartGIT I look around for my changes, but they're not visible in pandashop.html. Why? NOTE: Which branch is HEAD (green arrow) above?

-37 - STEP 5: Alice does a pull via her SmartGIT I look around for my changes, but they're not visible in pandashop.html. Why? NOTE: Which branch is HEAD (green arrow) above? We need to change to the bobranch.

-38 - The Branch Manager I look around for my changes, but they're not visible in pandashop.html. Why? NOTE: Which branch is HEAD (green arrow) above? We need to change to the bobranch.

-39 -

-40 - NOW we have Bob's changes on Alice's system Pandashop's log. The bulleted list insertion.

-41 - FINAL STEP: Merging Bob's changes into Alice's Master. Alice switches back to Master. Alice selects the Merge button. AND... bobranch is NOT visible. WTF?

-42 - FINAL STEP: Merging Bob's changes into Alice's Master. Alice switches back to Master. Alice selects the Merge button. AND... bobranch is NOT visible. WTF?

-43 - FINAL STEP: Merging Bob's changes into Alice's Master. Alice switches back to Master. Alice selects the Merge button. AND... bobranch is NOT visible. WTF?

-44 - SO we were looking at the world from 'testing' viewpoint. Change that to bobranch, that's what we want to see. Select the bobranch branch to be merged into master.

-45 - NOW did the merge work? Is master up-to-date? Change that to bobranch, that's what we want to see. Select the bobranch branch to be merged into master. Yep. ALmost done, Alice. Hang in there!

-46 - Bitbucket: origin A -- B -- C -- D -- E testing master bobranch A -- B -- C -- D - E | master testing bobranch A -- B -- C -- D - E | master testing bobranch Final Step: Alice needs to PUSH her merged work up to bitbucket.

-47 - Bitbucket: origin A -- B -- C -- D -- E testing master bobranch A -- B -- C -- D - E | master testing bobranch A -- B -- C -- D - E | master testing bobranch Final Step: Alice needs to PUSH her merged work up to bitbucket.

A -- B -- C -- D -- E testing master bobranch Bitbucket: originA -- B -- C -- D - E | master testing bobranch Final Step: Now the bitbucket repo is up to date. (Bob should Pull) A -- B -- C -- D -- E testing master bobranch

-49 - What you should understand when we're done: meaning of master, origin, HEAD, branch meaning of 'check out' how to read and understand Branch Diagrams Concepts about how SmartGIT represents branches The issue of Merging (but not (yet) how to resolve conflicts)

-50 - What I hope you will understand, but we're not there yet: Hands-on ability to fluently use SmartGit and bitbucket to manage team projects where merging is concerned. We will continue to gain experience with it, as the semester proceeds.