Gitflow process. Adapt Learning: Gitflow process. Document control

Similar documents
Git. A Distributed Version Control System. Carlos García Campos carlosgc@gsyc.es

MOOSE-Based Application Development on GitLab

Introduction to the Git Version Control System

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

Git Basics. Christian Hanser. Institute for Applied Information Processing and Communications Graz University of Technology. 6.

Developer Workshop Marc Dumontier McMaster/OSCAR-EMR

Version Uncontrolled! : How to Manage Your Version Control

Annoyances with our current source control Can it get more comfortable? Git Appendix. Git vs Subversion. Andrey Kotlarski 13.XII.

Version Control with Git. Linux Users Group UT Arlington. Rohit Rawat

Version Control for Computational Economists: An Introduction

Version Control with Svn, Git and git-svn. Kate Hedstrom ARSC, UAF

Version control with GIT

Palantir.net presents Git

Version Control with Git. Kate Hedstrom ARSC, UAF

Version Control! Scenarios, Working with Git!

FEEG Applied Programming 3 - Version Control and Git II

Version Control with Git. Dylan Nugent

Version Control Systems: SVN and GIT. How do VCS support SW development teams?

Using Git for Project Management with µvision

Two Best Practices for Scientific Computing

Introduction to Version Control with Git

Version Control with. Ben Morgan

PKI, Git and SVN. Adam Young. Presented by. Senior Software Engineer, Red Hat. License Licensed under

Source Control Systems

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

Introduction to Version Control

Version Control. Version Control

Introduc)on to Version Control with Git. Pradeep Sivakumar, PhD Sr. Computa5onal Specialist Research Compu5ng, NUIT

Git, GitHub & Web Hosting Workshop

Introducing Xcode Source Control

CS 2112 Lab: Version Control

Zero-Touch Drupal Deployment

Software configuration management

Introduction to Software Engineering (2+1 SWS) Winter Term 2009 / 2010 Dr. Michael Eichberg Vertretungsprofessur Software Engineering Department of

Unity Version Control

Data management on HPC platforms

MATLAB & Git Versioning: The Very Basics

Surround SCM Best Practices

Implementing Continuous Integration and Cloud Server Infrastructure for an International Enterprise Based In Finland

Git Branching for Continuous Delivery

An Introduction to Git Version Control for SAS Programmers

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Improving your Drupal Development workflow with Continuous Integration

Content. Development Tools 2(63)

Eliminate Workflow Friction with Git

Version Control Systems

Version Control using Git and Github. Joseph Rivera

Git Basics. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 22

Introduction to Source Control ---

Integrated version control with Fossil SCM

CISC 275: Introduction to Software Engineering. Lab 5: Introduction to Revision Control with. Charlie Greenbacker University of Delaware Fall 2011

Work. MATLAB Source Control Using Git

ECE 4750 Computer Architecture, Fall 2015 Tutorial 2: Git Distributed Version Control System

Version Control with Git

In depth study - Dev teams tooling

Version Control with Git

Advanced Computing Tools for Applied Research Chapter 4. Version control

Git Tutorial - How to Create a Full Project

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison

F9D7 04 (ESKWP2): Word Processing Software 2

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

Understanding Code Management in a Multi-Vendor Environment. Examples of code management in a multi-team environment

Word processing software

What's New In DITA CMS 4.0

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer GIT

GECKO Software. Introducing FACTORY SCHEMES. Adaptable software factory Patterns

Revision control systems (RCS) and

Software Configuration Management. Slides derived from Dr. Sara Stoecklin s notes and various web sources.

RADFORD UNIVERSITY. Radford.edu. Content Administrator s Guide

Version Control Using Subversion. 12 May 2013 OSU CSE 1

Module developer s tutorial

Source Control Guide: Git

Working Copy 1.4 users manual

Automatic promotion and versioning with Oracle Data Integrator 12c

Using Git for Centralized and Distributed Version Control Workflows - Day 3. 1 April, 2016 Presenter: Brian Vanderwende

Version Control with Subversion and Xcode

Subversion workflow guide

Enterprise-level EE: Uptime, Speed, and Scale

Jazz Source Control Best Practices

Puppet Firewall Module and Landb Integration

Solving the Software Quality Challenges of Agile Development

Master s Thesis. git-sprite: Supporting Tool for Pull-Based Software Development Model. Yusuke Saito

Using GitHub for Rally Apps (Mac Version)

DevShop. Drupal Infrastructure in a Box. Jon Pugh CEO, Founder ThinkDrop Consulting Brooklyn NY

AVOIDING THE GIT OF DESPAIR

Derived from Chris Cannam's original at, an.

Introduction to Subversion

Continuous Integration

Ensure Merge Accuracy in Continuous Integration Development Environments

The Real Challenges of Configuration Management

Lab Exercise Part II: Git: A distributed version control system

Continuous Integration and Delivery at NSIDC

Transcription:

Adapt Learning: Gitflow process Document control Abstract: Presents Totara Social s design goals to ensure subsequent design and development meets the needs of end- users. Author: Fabien O Carroll, Sven Laux Version: 0.1 Date: 02 / 10 / 2013 Summary of Changes: Versions Date Description 0.1 02 / 10 / 2013 Initial draft for review 1 P age

Contents Adapt Learning: Gitflow process... 1 Document control... 1 Purpose of document... 3 Glossary of terms... 3 What is Gitflow?... 4 How do we use Gitflow?... 6 Repositories... 6 Branches... 6 Master and develop branches... 6 Feature branches... 6 Hotfix branches... 6 Keeping updated... 7 Deleting branches... 7 Committing... 7 Merging... 8 2 P age

Purpose of document This document has been written to outline and define the version control process we will be using for the Adapt Learning open source project. It is aimed at anyone that would like to get involved by contributing code. We will be using Git to version control the codebase. Our aim is to keep a clean but informative history of commits, allowing us to revert mistakes easily. Glossary of terms This section describes the basic terms we use and assume knowledge of. Full documentation of Git terms can be found at: http://git- scm.com/docs Term Repository Commit Commit message Branch Master Develop Feature Hotfix Release / release candidate Tag Description A Git repository is essentially a collection of branches, all related to the same code base. A commit in Git can be thought of as a snapshot of the repository at any given point. Commits can be referenced by SHA1 checksums, tags or branches. A commit message is the message that describes the changes made in a commit. viewable with `git log`. Please see commit section below. A branch in Git can be thought of as a sequence of commits which can be separate from all other commits. A branch may be merged or rebased onto another branch to introduce its commit history to other branch. The master branch is the parent branch of all other branches, including develop. In our process, it will receive only 2 types of commits: Hotfixes and major updates. The master branch will always be contain stable code and will be what the public will receive. The develop branch is a branch spun from the master branch. It is where all feature branches will be derived from. The code contained in develop should always be stable. This branch will be the source of the latest codebase, including nightly builds for example. Develop will receive all Hotfixes as well as master. A feature branch is a branch used to develop new functionality. Very large feature additions may require multiple feature branches to be created. A hotfix branch is used for critical bug fixes. This type of branch is taken directly from master and, once the work is completed, merged directly to master and develop using a - - squash merge. A release branch is used when working on large features which are split up into separate branches, or to test integration A tag is the term used to define a textual label that can be associated with a specific revision. In the context of the Adapt Learning project, we use it to identify stable versions of the code base. 3 P age

What is Gitflow? Git flow is a workflow for developing with the Git version control system. It is how we structure our repository, our commits and branches. For the most part this document is based this on Vincent Driessen's article A successful Git branching model at http://nvie.com/posts/a- successful- git- branching- model/ and thus we will be using feature and hotfix branches, a main develop branch and we will up- merge local branches and tags. The diagram on the next page (taken from the above URL with thanks to Vincent) shows an overview of this process. The only difference we apply to the process outlined by Vincent is that we will not use the - - no- ff merge. This means that when merging feature branches into master and develop, we are breaking the commit history up into manageable chunks. This is based on and incorporates the advice on the article at https://sandofsky.com/blog/git- workflow.html We will use tags only in the master branch. The develop branch will always aim to be stable and bugs will have tickets and a branch created to fix them. We will enforce this by running tests pre and post merge of the develop branch and code review for all merge requests. On the positive side, not using - - no- ff and using an interactive rebase means that if a bug is introduced we do not have to deal with a large amount of irrelevant commits as the commits will be sequenced in logical steps. 4 P age

5 P age

How do we use Gitflow? Repositories There are two repositories: Authoring tool Output framework The reason for this is to keep the commit histories clear and relevant. It also allows developers to on components in isolation, which is most relevant to the output framework (as they will not need to clone the whole authoring tool repository). When the development of the authoring tool has begun, this document will be updated to inform developers how to checkout both of the repository's in relation to each other (e.g. whether they need to be checked out as siblings or parent/child etc.) We will also produce futher documentation inlcuding specific instructions on how to get started and how to work with the authoring tool in particular, as this requires both codebases. Branches Master and develop branches There will be two long- running branches - master and develop - these will be protected branches, meaning only a select few will have the ability to push changes directly to these branches. All additions to these branches must be done via a merge request (pull- request), this allows code review of everything that enters the framework and ensure both master and develop branches stay stable. Feature branches When developing new functionality or features, or simply refactoring/optimizing core code you should create a feature branch, feature branches are branched from the develop branch and named after their ticket number or a brief description of the work being done. Naming convention: Feature branches should always be prefixed with feature/, for example feature/2345 or feature/scorm_tracking. Hotfix branches When a serious bug is found or a fix is needed immediately, you should create a hotfix branch. Hotfix branches are spun directly from master, tested as soon as possible and merged into the master branch using a - - squash merge. This gives us a commit checkpoint of the fix being implemented. Hotfix branches should also be merged directly into develop. Naming convention: 6 P age

Hotfix branches should always be prefixed with hotfix/, for example hotfix/mcq_multiple_attempts Creating branches With the exception of Hotfixes, branches should only ever be spun off the develop branch. The command line for creating a branch is: $ git fetch origin develop $ git checkout -b <fix_type>/<ticket_number> develop Keeping updated When working on a branch you should often up- merge from the parent branch. This means you merge any changes in develop into your branch. It avoids conflicts when the time comes for your branch to be merged back in. The relevant commands are listed below: If your branch is a local branch: $ git fetch origin master $ git rebase origin/master If your branch is remote: $ git pull origin master Deleting branches Hotfix branches should be deleted as soon as they are merged into both master and develop. Feature branches can be deleted once they have been tested, peer reviewed, merged into develop and retested. Committing We aim to follow the 50/72 rule for committing messages (http://stackoverflow.com/questions/2290016/git- commit- messages- 50-72- formatting). Key points: To keep each commit concise and direct To including why a change was made Capitalized, short (50 chars or less) summary More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. To avoid mixing whitespace changes with functional changes as this will make the code review process longer. To speak in the imperative tense, not past, Update not Updated Further paragraphs come after blank lines Bullet points are okay, too 7 P age

o o Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here Use a hanging indent In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Further reading about best practice for Git commit messages: https://wiki.openstack.org/wiki/gitcommitmessages http://ablogaboutcode.com/2011/03/23/proper- git- commit- messages- and- an- elegant- git- history/ Merging As mentioned before, your private branches should be cleaned up using rebase - i if they are large features with many checkpoints, or just merged with - - squash this means that each feature will come as a single chunk if appropriate, or manageable chunks if it is too large. $ git fetch origin develop $ git checkout develop $ git merge -squash feature/1234 8 P age