Using GitHub and SourceTree to work with DITA TC repositories

Similar documents
Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master...

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion

Github/Git Primer. Tyler Hague

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

Tips on how to set up a GitHub account:

Tizen/Artik IoT Practice Part 4 Open Source Development

Visualizing Git Workflows. A visual guide to 539 workflows

Git for Subversion users

Introduction to Git. Database Systems DataLab, CS, NTHU Spring, 2018

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

Intro to Github. Jessica Young

MOOSE-Based Application Development on GitLab

CS 390 Software Engineering Lecture 5 More Git

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

Git. Presenter: Haotao (Eric) Lai Contact:

DEVNET Introduction to Git. Ashley Roach Principal Engineer Evangelist

Git, the magical version control

Lecture 6 Remotes. Sign in on the attendance sheet!

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU

LPF Training Handbook!

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

Software Development I

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani -

Midterm Next Week. Last year s midterm (which didn t include remotes):

The Rock branching strategy is based on the Git Branching Model documented by Vincent Driessen.

Django MFA Documentation

Section 1: Tools. Kaifei Chen, Luca Zuccarini. January 23, Make Motivation How... 2

1. Which of these Git client commands creates a copy of the repository and a working directory in the client s workspace. (Choose one.

Version Control: Gitting Started

Introduction to Git and Github

The Old World. Have you ever had to collaborate on a project by

LATEX Made Easy with Overleaf!

Version Control. Version Control

Tutorial 2 GitHub Tutorial

Git Basi, workflow e concetti avanzati (pt2)

Version Control Systems (Part 1)

Distributed Version Control

G E T T I N G S TA R T E D W I T H G I T

Version Control Systems: Overview

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

Git tutorial. Katie Osterried C2SM. October 22, 2015

Collaborate. w/ ArcGIS Runtime SDK for Android

Version Control with Git ME 461 Fall 2018

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

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes

AIS Grid School 2015

Use git rm to remove files from workspace

Versioning with git. Moritz August Git/Bash/Python-Course for MPE. Moritz August Versioning with Git

How to git with proper etiquette

CSC 2700: Scientific Computing

Lab 08. Command Line and Git

Esri on GitHub: How to Participate in Open Source Projects

FPLLL. Contributing. Martin R. Albrecht 2017/07/06

Git for Version Control

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

Version Control System GIT

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

Git: Distributed Version Control

django simple pagination Documentation

Version control with Git.

Version control CSE 403

Version Control with Git

Improving Your Life With Git

Git Tutorial. André Sailer. ILD Technical Meeting April 24, 2017 CERN-EP-LCD. ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36

Index. Alias syntax, 31 Author and commit attributes, 334

Introduction to Git and Github Repositories

Python Project Example Documentation

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Version Control. Version Control

Version control CSE 403

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

Revision Control and GIT

Beyond git add/commit/push

google-search Documentation

Version Control. Collaborating with git. Tim Frasier

Integrate Collaboration into your Workflow

Section 1: Tools. Contents CS162. January 19, Make More details about Make Git Commands to know... 3

CS314 Software Engineering Configuration Management

Git & Github Fundamental by Rajesh Kumar.

Managing Network Configurations with Git and GitLab

Lecture 3: Processing Language Data, Git/GitHub. LING 1340/2340: Data Science for Linguists Na-Rae Han

Git: Distributed Version Control

a handful of Git workflows for the agilist steven harman twitter: stevenharman

Online Remote Repositories

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

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

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

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1

SCAP Security Guide Questions / Answers. Contributor WorkShop Volume #2

GUIDE TO MAKE A REAL CONTRIBUTION TO AN OPEN SOURCE PROJECT 1. 1

Welcome! Virtual tutorial will start at 15:00 GMT. Please leave feedback afterwards at:

b. Developing multiple versions of a software project in parallel

git Version: 2.0b Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command:

Lab Objective. Lab Assignment. Downloads and Installation


SwanSim - A Guide to Git / SourceTree / GitLab for Windows

SCAP Security Guide Questions / Answers. Ján Lieskovský Contributor WorkShop November 2015

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

Using SourceTree on the Development Server

Git GitHub & secrets

Transcription:

Using GitHub and SourceTree to work with DITA TC repositories Kristen James Eberlein Eberlein Consulting LLC

Agenda 1. Before you begin 2. Getting set up: 1. Fork the DITA TC repository 2. Clone your fork to your local system 3. Add the upstream repository 4. Fetch from the upstream repository 3. Workflow for performing work 1. Create a new branch 2. Perform your work 3. Commit your changes 4. Push the commit to your fork 5. Open a pull request against the upstream repository 4. Best practices 1. Commits and commit messages 2. Best practices for pull requests and pull request messages

Before you begin Install SourceTree Create a GitHub account, if you don t already have one

Workflow for performing work 1. Create a new branch 2. Perform your work 3. Commit your changes 4. Push the commit to your fork 5. Open a pull request against the upstream repository

Fork the DITA TC repository 1. From the GitHub repository page, click Fork. 2. Make note of the URL for your fork; you will need it in the next procedure. Here are the current DITA TC repositories: DITA specification DITA for Technical Communication DITA for Learning & Training Lightweight DITA DITA stylesheets DITA RNG converter

Clone your forked repository to your local system 1. From within SourceTree, click File > Clone/New. 2. In the Clone window, specify information: 1. In the first field, paste the URL of your fork. 2. In the 2 nd field, type the path for the directory on your local system. 3. In the 3 rd field, type a name for the repository. This name will be displayed on the tab in SourceTree. 3. Click Clone.

Add the upstream repository 1. From within SourceTree, on the tab for the repository that you cloned, click Settings. 2. On the Repository Settings window, click Add. 3. On the Remote Details window, provide information: 1. In the Remote name field, type upstream. 2. In the URL/Path field, paste the URL of the repository that you forked. 3. Click OK. 4. On the Repository Settings window, click OK.

Fetch from the upstream repo 1. From Source, in the left pane, expand REMOTES. 2. Right-click upstream, and click Fetch from upstream. SourceTree will fetch the content and branches from the upstream repository.

Workflow for performing work 1. Create a new branch, based on the appropriate branch of the upstream repository. 2. Perform your work locally. 3. Commit your changes. 4. Push your changes to your fork of the upstream repository. 5. Open a pull request against the appropriate branch of the upstream repository.

Create a new branch on which to perform the work 1. Expand REMOTES > Upstream. 2. Right-click the appropriate upstream branch, and then click Checkout upstream/<name-ofbranch>. 3. In the Checkout window, in the New local branch name field, type a name for the new branch. 4. Click OK.

Committing your changes 1. In SourceTree, you can see that you have uncommitted changes. 2. On the File Status page, select the modified files that you want to commit and stage them. 3. In the text box, enter your commit message, and then click Commit.

Push your changes to your fork 1. Click Push. 2. On the Push window, select the branch that you were working on, and then click Push.

Open a pull request (1 of 2) 1. From a browser, go to your fork of the DITA repository. 2. Switch to the branch on which you were working. 3. Check that you see your recent commit, and then click New pull request.

Open a pull request (2 of 2) 1. On the Open a pull request window, provide the necessary information: 1. Change the base field to the upstream branch in which you want to integrate your changes. 2. Ensure that the compare field is set to the branch in which you performed your work. 3. By default, the title field is populated with the title of your commit. 4. In the window, add more information about what your pull request contains. 5. Click Create pull request. You can continue to make commits to a pull request until it is merged.

Best practices 1. Best practices 1. Commits and commit messages 2. Best practices for pull requests and pull request messages

Best practices for commits A commit should focus on a single item that can be easily described. It can involve one or 100 files, but the changes should make sense together. Good A commit that changes a group of topics to rework short descriptions A commit that updates a group of topics and adds some topics to implement a specific DITA 2.0 feature A commit that updates every topic on @keyref to enforce consistency Not good A commit that adds a topic, edits 3 topics for an unrelated feature, corrects a typo in a map A commit that removes @rev from 50 topics and adds several new examples

Best practices for commit messages A commit message should be short and clear. Anyone reading the commit message (and familiar with TC work) should know what has changed Good Reworked short description in base element topics Implement new spiffy publication map Fixed normative language for keyref resolution Not good Edited topics Changes

Best practices for pull requests A pull request should group together related commits. You can continue to make commits after you have opened the pull request. Pushing commits to the same branch automatically adds them to the pull request. Good A commit to implement the DITA 2.0 element reference template + a commit that improves examples in those topics Not good A commit that suggests new examples for conref resultion + a comment that fixes typos in an appendix

Best practices for pull request messages

Educational resources

Educational resources On-demand training from GitHub.com Get started with SourceTree Help topics about the following: Install and set up SourceTree Understand the interface Version control and SourceTree Work using Git Working with Mercurial