Technology Background Development environment, Skeleton and Libraries

Similar documents
Technology Background Development environment, Skeleton and Libraries

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control:

Review Version Control Concepts

Software Tools Subversion

Prof. Dr. Marko Boger. Prof. Dr. Christian Johner. Version Management

Software Project (Lecture 4): Git & Github

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018

Working with CVS in Eclipse

Push up your code next generation version control with (E)Git

6.170 Laboratory in Software Engineering Eclipse Reference for 6.170

Revision Control. An Introduction Using Git 1/15

Version control CSE 403

February 2 nd Jean Parpaillon

Tutorial: Getting Started with Git. Introduction to version control Benefits of using Git Basic commands Workflow

CSE 331 Software Design & Implementation

Index. Symbols. /**, symbol, 73 >> symbol, 21

Revision control. INF5750/ Lecture 2 (Part I)

Version control CSE 403

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

Version Control Systems

Git version control with Eclipse (EGit) Tutorial

AIS Grid School 2015

Version Control Systems (VCS)

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group

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

Branching and Merging

CVS. Computer Science and Engineering College of Engineering The Ohio State University. Lecture 21

TDDC88 Lab 4 Software Configuration Management

Git and GitHub. Dan Wysocki. February 12, Dan Wysocki Git and GitHub February 12, / 48

Software configuration management

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 11, 2017

Version control CSE 403

RSARTE Git Integration

Object Oriented Programming. Week 1 Part 2 Git and egit

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A:

Laboratorio di Programmazione. Prof. Marco Bertini

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Module Road Map. 7. Version Control with Subversion Introduction Terminology

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

GIT : BEST PRACTICES GUIDE BY ERIC PIDOUX DOWNLOAD EBOOK : GIT : BEST PRACTICES GUIDE BY ERIC PIDOUX PDF

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development;

Tools for software development:

Introduction to GIT. Jordi Blasco 14 Oct 2011

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

RSARTE Git Integration

Task-Oriented Solutions to Over 175 Common Problems. Covers. Eclipse 3.0. Eclipse CookbookTM. Steve Holzner

Software Revision Control for MASS. Git Basics, Best Practices

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management

A BASIC UNDERSTANDING OF VERSION CONTROL

12/7/09. How is a programming language processed? Picasso Design. Collaborating with Subversion Discussion of Preparation Analyses.

EGit in Eclipse. Distributed Verzion Control Systems

Windows. Everywhere else

Agenda. Several projects are using GIT Developer(s) Junio Hamano, Linus Torvalds. Qt Stable release (January 31, 2011)

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

Version Control. Version Control

Git. SSE2034: System Software Experiment 3, Fall 2018, Jinkyu Jeong

CSE 391 Lecture 9. Version control with Git

License. Introduction to Version Control with Git. Local Version Control Systems. Why Use Version Control?

Lab Exercise Test First using JUnit

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

Lab Objective. Lab Assignment. Downloads and Installation

Software Development I

Version Control. Version Control


A Journey in So,ware Development An overview of methods and tools (part 3)

Version Control with GIT

Git tutorial. Katie Osterried C2SM. October 22, 2015

Git AN INTRODUCTION. Introduction to Git as a version control system: concepts, main features and practical aspects.

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

Software Systems Design. Version control systems and documentation

CS 390 Software Engineering Lecture 3 Configuration Management

A Practical Introduction to Version Control Systems

CSCI 2132: Software Development. Norbert Zeh. Faculty of Computer Science Dalhousie University. Subversion (and Git) Winter 2019

Visualizing Git Workflows. A visual guide to 539 workflows

Computer Science Design I Version Control with Git

CSC 2700: Scientific Computing

Lab Exercise Git: A distributed version control system

I m an egotistical bastard, and I name all my projects after myself. First Linux, now git. Linus Torvalds, creator of Linux and Git

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

Apache Subversion Tutorial

Outline. Tutorial III. Eclipse. Basics. Eclipse Plug-in Feature

SECTION 2: HW3 Setup.

Git for Version Control

Version Control Systems: Overview

Algorithm Engineering

Documentation External Synchronization FirstSpirit

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

Handout 4: Version Control Reference

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

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

Introduction to Eclipse

Getting started with GitHub

[Software Development] Development Tools. Davide Balzarotti. Eurecom Sophia Antipolis, France

Version Control System GIT

Storing and Managing Code with CVS

Introduction to Git and Github

SpringSource Tool Suite 2.7.1

Revision Control. Software Engineering SS 2007

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

Submitting your Work using GIT

Transcription:

Technology Background Development environment, Skeleton and Libraries Slides by Prof. Dr. Matthias Hölzl (based on material from Dr. Andreas Schröder)

Outline Lecture 1 I. Eclipse II. Git Lecture 2 IV. Skeleton Overview V. Libraries Overview VI. Game Rules and Coding Task 2

Part I. Eclipse

Part I: Goals Learning Target Recognize the power of Eclipse Identify what you did not know yet Know where to find tutorials and help Being able to set up the Eclipse IDE for the lab 4

Eclipse Eclipse is far more than a Java editor Code navigation and exploration Refactoring Background compilation Customizable build system Extensibile: Git, JUnit, Code Coverage, Web development tools, 5

Eclipse Recommended reads Workbench user guide > Tips and tricks Java development user guide > Tips and tricks Recommended shortcuts Quick Fix (Ctrl+1), Quick Access (Ctrl+3) Open Type / resource (Ctrl+Shift+T / Ctrl+Shift+R) Open declaration / Javadoc (F3 / F2) Quick type hierarchy (Ctrl+T) Quick outline (Ctrl+O) Refactor / Rename (Alt+Shift+T / Alt+Shift+R) Key bindings overview (Ctrl+Shift+L) J 6

Setting up Eclipse To setup your Eclipse, you need to: 1. Download and install eclipse 2. Setup basics: code styles, save actions, file encoding, 3. Setup Tomcat 4. Setup Git 5. Setup DB 6. Setup Launch configurations 7. Install other plugins/extensions as needed (e.g., EclEmma) 7

Part II. Git

Git Git is a modern distributed version control system (VCS) Initial release 2005 by Linus Torwalds Widely adopted in open source communities: Linux Kernel, Ruby on Rails, Android, Debian, Can best be learned if you forget everything you know about how (centralized) version control works! 9

Fundamentals of version control Repository a database containing files under version control and the history of these files. Working Copy a local copy of files from the repository. May be modified, and may not represent the most recent repository revision. Revision the state of a file (CVS), of a branch (Git), or of the whole repository (SVN) as committed to the version control system. Change Set a set of modifications to files under version control. Commit the act of writing a change set from the working copy to the repository. Update the act of fetching changes that have been performed on the repository since the last update and applying them to the working copy. 10

Fundamentals of version control Branch a set of files under version control that evolve independently of other file sets. Often defines an own line of development of a product. Tag a human-readable link to a specific revision. Is often used to mark the source code of released versions (e.g. tag v_2_0_3). Trunk/Master the branch denoting the main line of development of a product. Merge the act of reconciling change sets from parallel branches. Switch the act of changing the working copy from a branch to another. Conflict occurs when a file was changed concurrently, and the VCS cannot reconcile the changes automatically. Conflicts must be resolved manually. 11

Centralized VCS dev machine server update commit working Latest from VCS branch merge Cannot work without connectivity Needs server to branch and merge Cannot save experimental features locally

Decentralized VCS dev machine server switch working commit synchronize branch synchronize merge Works without connectivity Can branch and merge against local VCS Needs synchronization among multiple VCS

Git Staging commit stage Working area Staging area Local branches Git allows to select changes for commit Staging area lies between working area and local branches

Git dev machine server clone push switch working commit merge fetch merge Local branches Remote branches pull = fetch & merge Local branches (on server)

egit Staging View Helpful tool for creating commits Faster than Menu > Team > Add 16

Synchronize Workspace View Menu Team Synchronize Workspace (or change to Team Synchronizing perspective) 17

egit from the start 18

egit: cloning 19

egit: clone results 20

egit: Import Projects 21

Creating a new branch 22

The art of branching When working on a user story Create a branch for your story (= feature branch) Work on the branch Merge the branch into master Don t disconnect from the repository (= team): fetch & merge master changes to your branch regularly! Read the Git tutorials 23

GitLab Flow: Feature Branches

GitLab Flow: Release Branches

Commit messages What does the following history tell you? ea42b79 2db0f12 147709f 22b25e0 7f96f57 59a2ed6 There were some bugs in the code!!!! Didn't know fixed two build-breaking issues: the ant task co Tweaks to some files polishing update And the following? 5ba3db6 84564a0 e142fd1 887815f ac8326d Fix failing CompositePropertySourceTests Rework @PropertySource early parsing logic Add tests for ImportSelector meta-data Update docbook dependency and generate epub Polish mockito usage 26

The art of writing commit messages Good commit messages are important Separate subject from body with a blank line Limit the subject line to 50 characters Capitalize the subject line Do not end the subject line with a period Use the imperative mood in the subject line Wrap the body at 72 characters Use the body to explain what and why vs. How See http://chris.beams.io/posts/git-commit/ for more 27

Tracking remote branches Instead of checking out a remote branch directly, it's better to create a local branch that tracks the remote branch. After that, you can pull and push directly to/from the original remote branch. If you push a branch that you created locally, the local branch starts tracking the remote copy. 28

Deleting remote branches Deleting the remote reference doesn't do anything on the server. To remove a remote branch you have to push "nothing" to the branch: git push origin --delete branch or with the push dialog in egit (see picture). Deleting remote branches is most fun when others are tracking it J 29

Switching between branches Git allows to switch between branches at any time egit: Menu Team Switch To If you have uncommitted changes, you have to either commit them first or stash your changes egit: Menu in Git Repository View Stash Changes Those changes get stored" and you can switch branches You can restore stashed changes in the Git Repository View 30

Resolving conflicts Merging branches may lead to conflicts. When this happens you end up in a "merging-state" where you have to resolve the conflicts. Resolve conflicts: Menu Team Merge Tool Or/and edit manually Then: Add to index Commit 31

Other (e)git hints Undoing changes: Use Menu Replace (HEAD Commit ) to replace files/folders with previous versions from the repository If you're used to SVN: don't forget to push Commit only writes to your local repository. Use "commit and push" in Commit dialog or push explicitly. Resolving conflicts without editing (e.g. for binary files) git checkout --ours <path> git checkout --theirs <path> 32

Other (e)git hints Use own repository (e.g. GitHub/GitLab) to experiment! Install full Git distribution (www.git-scm.com) and (optionally) GUI like TortoiseGit, etc. Have a look at the git command line 33

Some words on collaboration Merging a user story into master means integration Conflicts must be carefully resolved The whole codebase must compile All tests must pass: unit tests, integration tests, system tests Integrate early and opportunistically, It will not get easier if you wait! 34

GitLab: Project Overview

GitLab: List of Milestones

GitLab: Milestone

GitLab: Issues

GitLab: Issue

GitLab: Issue

GitLab: Issue

GitLab: Third-Party Scrum Support

GitLab: Branches

GitLab: Branches

GitLab: Merge Requests

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

Summary

Summary: Development Environment Eclipse The IDE for our project Git Distributed version control system Built-in branching facilities 61

Technology Background Development environment, Skeleton and Libraries Slides by Prof. Dr. Matthias Hölzl (based on material from Dr. Andreas Schröder)

Outline Lecture 1 I. Eclipse II. Git Lecture 2 IV. Skeleton Overview V. Libraries Overview VI. Game Rules and Coding Task 2

Part I. Eclipse

Part I: Goals Learning Target Recognize the power of Eclipse Identify what you did not know yet Know where to find tutorials and help Being able to set up the Eclipse IDE for the lab 4

Eclipse Eclipse is far more than a Java editor Code navigation and exploration Refactoring Background compilation Customizable build system Extensibile: Git, JUnit, Code Coverage, Web development tools, 5

Eclipse Recommended reads Workbench user guide > Tips and tricks Java development user guide > Tips and tricks Recommended shortcuts Quick Fix (Ctrl+1), Quick Access (Ctrl+3) Open Type / resource (Ctrl+Shift+T / Ctrl+Shift+R) Open declaration / Javadoc (F3 / F2) Quick type hierarchy (Ctrl+T) Quick outline (Ctrl+O) Refactor / Rename (Alt+Shift+T / Alt+Shift+R) Key bindings overview (Ctrl+Shift+L) J 6

Setting up Eclipse To setup your Eclipse, you need to: 1. Download and install eclipse 2. Setup basics: code styles, save actions, file encoding, 3. Setup Tomcat 4. Setup Git 5. Setup DB 6. Setup Launch configurations 7. Install other plugins/extensions as needed (e.g., EclEmma) 7

Part II. Git

Git Git is a modern distributed version control system (VCS) Initial release 2005 by Linus Torwalds Widely adopted in open source communities: Linux Kernel, Ruby on Rails, Android, Debian, Can best be learned if you forget everything you know about how (centralized) version control works! 9

Fundamentals of version control Repository a database containing files under version control and the history of these files. Working Copy a local copy of files from the repository. May be modified, and may not represent the most recent repository revision. Revision the state of a file (CVS), of a branch (Git), or of the whole repository (SVN) as committed to the version control system. Change Set a set of modifications to files under version control. Commit the act of writing a change set from the working copy to the repository. Update the act of fetching changes that have been performed on the repository since the last update and applying them to the working copy. 10

Fundamentals of version control Branch a set of files under version control that evolve independently of other file sets. Often defines an own line of development of a product. Tag a human-readable link to a specific revision. Is often used to mark the source code of released versions (e.g. tag v_2_0_3). Trunk/Master the branch denoting the main line of development of a product. Merge the act of reconciling change sets from parallel branches. Switch the act of changing the working copy from a branch to another. Conflict occurs when a file was changed concurrently, and the VCS cannot reconcile the changes automatically. Conflicts must be resolved manually. 11

Centralized VCS dev machine server update commit working Latest from VCS branch merge Cannot work without connectivity Needs server to branch and merge Cannot save experimental features locally

Decentralized VCS dev machine server switch working commit synchronize branch synchronize merge Works without connectivity Can branch and merge against local VCS Needs synchronization among multiple VCS

Git Staging commit stage Working area Staging area Local branches Git allows to select changes for commit Staging area lies between working area and local branches

Git dev machine server clone push switch working commit merge fetch merge Local branches Remote branches pull = fetch & merge Local branches (on server)

egit Staging View Helpful tool for creating commits Faster than Menu > Team > Add 16

Synchronize Workspace View Menu Team Synchronize Workspace (or change to Team Synchronizing perspective) 17

egit from the start 18

egit: cloning 19

egit: clone results 20

egit: Import Projects 21

Creating a new branch 22

The art of branching When working on a user story Create a branch for your story (= feature branch) Work on the branch Merge the branch into master Don t disconnect from the repository (= team): fetch & merge master changes to your branch regularly! Read the Git tutorials 23 Viel Erfolg mit Git J Und jetzt zum nächsten Thema, MyLyn 23

GitLab Flow: Feature Branches

GitLab Flow: Release Branches

Commit messages What does the following history tell you? ea42b79 2db0f12 147709f 22b25e0 7f96f57 59a2ed6 There were some bugs in the code!!!! Didn't know fixed two build-breaking issues: the ant task co Tweaks to some files polishing update And the following? 5ba3db6 84564a0 e142fd1 887815f ac8326d Fix failing CompositePropertySourceTests Rework @PropertySource early parsing logic Add tests for ImportSelector meta-data Update docbook dependency and generate epub Polish mockito usage 26 Viel Erfolg mit Git J Und jetzt zum nächsten Thema, MyLyn 26

The art of writing commit messages Good commit messages are important Separate subject from body with a blank line Limit the subject line to 50 characters Capitalize the subject line Do not end the subject line with a period Use the imperative mood in the subject line Wrap the body at 72 characters Use the body to explain what and why vs. How See http://chris.beams.io/posts/git-commit/ for more 27 Viel Erfolg mit Git J Und jetzt zum nächsten Thema, MyLyn 27

Tracking remote branches Instead of checking out a remote branch directly, it's better to create a local branch that tracks the remote branch. After that, you can pull and push directly to/from the original remote branch. If you push a branch that you created locally, the local branch starts tracking the remote copy. 28

Deleting remote branches Deleting the remote reference doesn't do anything on the server. To remove a remote branch you have to push "nothing" to the branch: git push origin --delete branch or with the push dialog in egit (see picture). Deleting remote branches is most fun when others are tracking it J 29

Switching between branches Git allows to switch between branches at any time egit: Menu Team Switch To If you have uncommitted changes, you have to either commit them first or stash your changes egit: Menu in Git Repository View Stash Changes Those changes get stored" and you can switch branches You can restore stashed changes in the Git Repository View 30

Resolving conflicts Merging branches may lead to conflicts. When this happens you end up in a "merging-state" where you have to resolve the conflicts. Resolve conflicts: Menu Team Merge Tool Or/and edit manually Then: Add to index Commit 31

Other (e)git hints Undoing changes: Use Menu Replace (HEAD Commit ) to replace files/folders with previous versions from the repository If you're used to SVN: don't forget to push Commit only writes to your local repository. Use "commit and push" in Commit dialog or push explicitly. Resolving conflicts without editing (e.g. for binary files) git checkout --ours <path> git checkout --theirs <path> 32 32

Other (e)git hints Use own repository (e.g. GitHub/GitLab) to experiment! Install full Git distribution (www.git-scm.com) and (optionally) GUI like TortoiseGit, etc. Have a look at the git command line 33 33

Some words on collaboration Merging a user story into master means integration Conflicts must be carefully resolved The whole codebase must compile All tests must pass: unit tests, integration tests, system tests Integrate early and opportunistically, It will not get easier if you wait! 34

GitLab: Project Overview

GitLab: List of Milestones

GitLab: Milestone

GitLab: Issues

GitLab: Issue

GitLab: Issue

GitLab: Issue

GitLab: Third-Party Scrum Support

GitLab: Branches

GitLab: Branches

GitLab: Merge Requests

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

GitLab: Merge Request

Summary

Summary: Development Environment Eclipse The IDE for our project Git Distributed version control system Built-in branching facilities 61