IC Documentation. Release 0.1. IC team

Size: px
Start display at page:

Download "IC Documentation. Release 0.1. IC team"

Transcription

1 IC Documentation Release 0.1 IC team Jan 22, 2019

2

3 Contents 1 How to contribute to IC Prepare github Prepare your repositories Use a higher-level git interface History philosophy Workflow summary Workflow in detail Testing Style guide How to use notebooks in IC The problem with notebooks Workflow Core modules 13 4 Indices and tables 15 i

4 ii

5 Contents: Contents 1

6 2 Contents

7 CHAPTER 1 How to contribute to IC 1.1 Prepare github Get a github account if you do not already have one. Upload your SSH key, if you have not already done so. 1.2 Prepare your repositories TODO Fork the IC repository Clone your fork set nextic as upstream 1.3 Use a higher-level git interface Do yourself a favour, and use magit to interact with git: it s the best git UI on the planet. Even if you don t use or dislike Emacs, use magit, and think of Emacs as the GUI framework in which magit is written. You will enjoy and learn to understand git much more if you use magit. [Editor s note: Seriously, I tried to find something to recommend for those who don t use Emacs. It wasted a lot of my time, and I came to the conclusion that recommending anything else would be a waste of your time. Just use magit.] To make the magit experience even better, use helm. 3

8 1.4 History philosophy In the words of Ben Sandofsky: Treat public history as immutable, atomic, and easy to follow. Treat private history as disposable and malleable. The intended workflow is: 1. Create a private branch off a public branch. 2. Regularly commit your work to this private branch. 3. Once your code is perfect, clean up its history. 4. Merge the cleaned-up branch back into the public branch. In IC, step 4 is done by the IC administators after the work has been reviewed and approved, so you don t have to worry about this step for now. The history that appears in your local clone (your private history) is there entirely for your benefit. As such, it is malleable and disposable, and you can modify it however and whenever you like. The history that appears in the central nextic repository serves as a clean, high-level description of the evolution of the project, where it should be easy to find where and when something was changed, added, removed, where bugs were introduded (perhaps using tools such as git bisect), a high-level description of the changes should be available. As such, the central history should be linear, contain very descriptive commit messages describing and documenting the changes. The commits that appear in your fork on github can serve a number of purposes: A place from which you submit pull requests, asking for your contribution to be incorporated into the main repository. (The commits that appear in pull requests should therefore conform to the high standards required by the main history: clean, linear (usually squashed) and documented with descriptive commit messages.) Triggers of travis builds, checking that your work builds and passes all the tests in a clean environment. Sharing your work with other developers and collaborating on development with others before submitting a pull request. 1.5 Workflow summary 1. Create a topic branch starting at upstream/master in your local repo. 2. Make numerous checkpoint commits to your topic branch. 3. Write tests for the code you write. 4. Push the topic branch to your github fork (origin) whenever you want feedback from Travis. 5. In preparation for making a pull request (PR), squash the checkpoint commits into a smaller number of logically self-contained commits with descriptive, high-level commit messages. Try to make each commit (and its diff) tell a story that will be easily understood by the reviewers. 6. Fetch (whatever you do, do not pull) upstream/master into your local repository.. 4 Chapter 1. How to contribute to IC

9 7. Rebase your topic branch onto upstream/master. 8. Push the branch to origin. 9. a pull request (PR) from your github page. 10. Wait for the PR to be approved and merged. 11. Fetch upstream/master into your local repo. 12. Delete your topic branch, both locally and in your fork. 13. GOTO Workflow in detail In what follows, the commands required to achieve the effect will be given in two styles (eventually; initially the git CLIs are likely to be TODOs). 1. magit 2. git command line interface (CLI) In the case of magit you should type the instructions in some magit buffer inside Emacs. If no such buffer is visible, create the magit status buffer with M-x magit-status. This last command must be given in some buffer linked to a file or directory inside the relevant git repository. Magit buffers can usually be closed with q. Emacs commands in general can be interrupted with C-g. In the case of the git CLI, you should type the commands in a shell whose working directory is inside there relevant git repository. 1. Before starting some new work, make sure that you have the most recent IC code. magit: f e upstream RET f opens the magit fetching popup e allows you to specify the remote from which you would elike to fetch upstream specifies that you want to fetch from the central nextic repository. (This assumes that you have already added upstream as a remote pointing at nextic/ic in your local repository) git CLI: git fetch upstream 2. Create a topic branch. In the following examples replace topic with whatever name you want to give to your branch. The name sohuld be meaningful to you and identify the work that you are doing. You may end up having multiple topic branches in existence simultaneously, so picking good names will make life easier for you. magit: b c upstream/master RET topic RET b opens the magit branch popup c creates and checks out a new branch upstream/master is the location from which you want to branch off topic is the name of your new branch git CLI: git checkout -b topic upstream/master 1.6. Workflow in detail 5

10 Magit will walk you through these steps interactively. Helm, if you ve installed it, will improve the interactive experience. If you make a mistake magit will help you avoid digging yourself into a deeper hole. With the git CLI you are on your own. 3. Create plenty of checkpoint commits while you are working. Frequent checkpoint commits ensure that, if you ever get yourself into a complete mess, you can get out of it cheaply by reverting to a recent sensible state. This is how to do a local commit magit: M-x magit-status (or your keybinding, possibly C-x g) Opens the magit status buffer, showing you (among other things) * which files have been modified since the last commit * which files have been deleted since the last commit * which files exist but are not registered in the repository The most useful keys inside this buffer are * s: stage - include this in the next commit * u: unstage - undo a previous stage * n: next - move to the next interesting location * p: previous - move to the previous interesting location * c: commit - start the commit process * d: diff - open the magit diff popup So, you should specify what you want to be included in the commit by staging it. Then proceed with the commit with c, at which point a commit message buffer should appear, with self-explanatory comments inside it. In short, write a commit message and then perform the commit with C-c C-c. When you get around to creating a pull request, you should squash (see below) your checkpoint commit messages into a smaller number of coherent, clean, commits with descriptive commit messages describing your work. The purpose of the checkpoint commit messages is to make authoring the pull request commit messages as easy as possible. git CLI: TODO 4. Make sure that the code you contribute is adequately tested. See below. 5. Whenever you want to see whether your current code builds and passes all the required tests in a clean environment, commit (described above) and push to your fork (origin). magit: The first time in a new branch: P p origin RET Thereafter: P p P opens the magit push popup. Once there, p pushes to the remote which needs to be set once for each branch. git CLI: TODO 6. Once you have achieved something worth incorporating into the main repository, it s time to make a pull request (PR). Usually your pull request should consist of a smaller number of commits than you originally made during development, each with a carefully written, high-level, descriptive commit message describing your work. The commit message of a single-commit PR is taken as the default PR description text. If your PR contains more than one commit, you should create a description of the whole collection in the GitHub PR interface. 6 Chapter 1. How to contribute to IC

11 You should squash your numerous checkpoint commits to make cleaner PR commits. magit: l l: the first l opens the magit log popup, the second shows the log for the current branch only navigate down to the first commit in your branch with n and p (which stand for [n]ext and [p]revious line) r i: opens the magit rebase popup and selects interactive rebase. This will give you a buffer listing all the commits in the range you specified, accompanied by comments which explain what can be done. Typically you will want to do something like * n s s s s C-c C-c The n moves the cursor down to the next commit (because you want to leave the default action (pick) for the first (earliest) commit). The subsequent ss change the action for the subsequent commits to squash. This will incorporate the changes that appeared in the squashed commits, into the last unsquashed commits before them. Finally, C-c C-c instructs magit to perform the actions specified in the buffer. At this point you will get a commit buffer (you should be familiar with this from your checkpoint commits) containing a union of all the commit messages corresponding to the commits you have picked and squashed. Edit this carefully to make a single, clean, high-level, descriptive commit message describing the work you are proposing for inclusion in the main repository. If you have squashed everything down to a single commit, this message will be proposed to you as the default PR description message. When you are satisfied with your commit message, complete the commit with * C-c C-c 7. Fetch the latest developments on upstream/master. (You already did this in step 1.) magit: f e upstream RET git CLI: git fetch upstream 8. Rebase your topic branch onto upstream/master magit: b b topic RET: checkout topic r e master: rebase current branch (topic) onto master git CLI: TODO At this point, you may discover that new additions to the main repository conflict with your work. If this happens, abort the rebase magit: r a y ([r]ebase [a]bort [y]es) and proceed with the PR without rebasing. These conflicts will need to be resolved and your commits will have to rebased eventually, but, at this stage, it s best not to try it on your own if these complications arise: let some IC admin help you or do it for you on your first attempts. 9. Push your clean pull request-ready (PR) commits to your github fork magit: P -f p TODO: Need to mention 1.6. Workflow in detail 7

12 forcing the need to set pushremote at least once per branch git CLI: TODO 10. Submit a pull request (PR) from your github page. TODO: Is it worth writing anything here, or is github sufficiently self-explanatory on this topic? 11. Once your PR has been merged, you should receive an automatic from github. Once your PR has been merged you can proceed to clean up as follows. 12. Fetch the latest upstream/master into your local clone. (We ve done this before in steps 1. and 7.) magit: f e upstream RET 13. Delete your topic branch, both locally and in your fork. magit: b k topic RET b k origin/topic RET b k origin/topic RET : Yes! The same thing twice! The first on removes the branch on the remote, once that has gone, the second removes your local tracking branch. * git CLI: TODO 14. That s it. Now you can repeat the process all over again for some new work. Don t forget that you can interleave work on different branches: you can start work on some other branch before completing this cycle on your first branch. You can switch contexts by checking out the branch on which you want to work right now. If there is some uncommited work on the branch you were working on previously, you will have to do one of the following commit it stash it before git will allow you to switch to another branch. 1.7 Testing Write tests for any new code that you write. Before your code can be merged into the main repository it must be reviewed by someone else. Expect reviewers to reject your code if it does not come with adequate tests. By default, tests for invisible_cities/whatever/stuff.py should be in invisible_cities/ whatever/stuff_test.py. Tests serve a number of purposes: 1. Point out when something that worked before has been broken. 2. Help the author of the code understand what the code is supposed to do. This is a frequently underappreciated aspect of tests. On many occasions, the process of devising, writing and passing tests leads to a much better understanding of the tested code and the domain it addresses. 8 Chapter 1. How to contribute to IC

13 3. Act as documentation. While this is not the primary goal of tests, well written tests can be an excellent form of documentation. Try to write your tests in a way that makes them easy to understand for a human reader and that makes the behaviour and purpose of the tested code as clear as possible. Code that has made it into the central repository should already have accompanying tests. Before starting any work, make sure that the code you checked out passes all the tests. In the (hopefully extremely unlikely case) that it does not, contact the author of the failing code and make sure that a fix is uploaded to the central repository as soon as possible. Conversely, make sure that any pull requests you submit pass all tests. Enabling Travis in your fork will give you an early warning. Travis automatically runs on any pull requests submitted to the nextic main repository, and the repository configuration prevents merging pull requests which contain failing tests. Submitting code without tests is equivalent to saying that you don t mind if the code is broken by someone else! 1.8 Style guide Follow PEP8, but bear in mind that the most important part of PEP8 is: TODO copypasta n link to the Readability is more important than any of these rules 1.8. Style guide 9

14 10 Chapter 1. How to contribute to IC

15 CHAPTER 2 How to use notebooks in IC 2.1 The problem with notebooks Notebooks are as very useful tool for prototyping and preparing analysis, but they can create a lot of conflicts under a version control system (like git). Usually this is due to the outputs, which can change from one execution to another (simply the execution counter of each notebook cell can give conflicts). To solve those issues we will only put into git notebooks without output. We use git filters to automatize this process. This solution requires a filter script (ipynb_drop_output) and some git configuration: the files. gitattributes and.gitconfig already included in the repository and a small change in.git/config which can be done with this command: git config --add include.path $ICTDIR/.gitconfig Another source of troubles are filenames, since each developer can have different paths and this will require changes in the code to be able to read them. The easiest way to avoid this conflicts is by following a naming convention, in our case all files must be under $IC_DATA. Each user have to define $IC_DATA to some folder and put the files needed in the notebook there. 2.2 Workflow 1. First thing you will need to do is to configure your environment, this can be done as usual: source manage. sh work_in_python_version Define your $IC_DATA if you don t have it yet. 3. Create/checkout your development branch for the notebook (see step 1 in How to contribute to IC) 4. Once you have it, you can simply run jupyter notebook and get started working on your new notebook. Remember to use $IC_DATA for your input files in case you need them. 5. You can commit your work and push it to you fork as many times you want, but keep in mind that the commited version will not have the output as they will pass through the stripping filter. 11

16 6. In principle that should be enough, if you simply run a notebook without changing the code, no changes should be detected by git. But they will usually appear if you run git status, for example: $ git status On branch notebooks Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified:../invisible_cities/cities/diomira.ipynb If you try to see the changes, you won t be able to see them, git diff will not show any output. This has been reported by other git users. To solve it, git index has to be updated, the easiest way to do this is running git add notebook.ipynb. In magit, the notebook won t appear in magit-status but if you try to change to another branch, rebase, etc. git will complain: GitError! The following untracked working tree files would be overwritten by checkout: [Type `$' for details] By pressing $ you can see the error: 1 git... checkout master error: Your local changes to the following files would be overwritten by checkout: invisible_cities/cities/diomira.ipynb Please, commit your changes or stash them before you can switch branches. You can add the file typing s for the file stage menu and then putting the notebook giving the conflict. After that git won t detect the changes and you will be able to change branch or whatever you need. 12 Chapter 2. How to use notebooks in IC

17 CHAPTER 3 Core modules A major revision of the core modules has been conducted. This includes cleaning up, eliminating many obsolete functions, as well as re-organizing functions, across modules. core_functions.py: general purpose functions. It has been cleaned up, and a simple test suite has been added. There is also a doc notebook (which is not included in this commit, waiting for policy on notebooks and docs to be fully agreed). core_functions_performance.py: a module with a simple example case of performance of python vs Cython for a particular example. mpl_functions.py: general purpose plotting functions. No tests are relevant here, but the plotting functions are exercised in the documentation notebooks (diomira, irene) which are ready to be committed. system_of_units.py: definition of system of units. Extensively tried and tested, stable. random_sampling.py: sampler of SiPM pdf functions. Diomira-notebook shows that it behaves as expected but a test would be nice (Gonzalo Martinez, pending). log_config.py: configures the logger. Not used currently, possible candidate for deletion. configure.py: utility used for configuration, works as expected, stable. sensor_functions.py: collects functions that manipulate sensors. Most of them exercised in notebooks. A test could be added. tbl_functions.py: utility for pytables manipulation. wfm_functions.py: waveform manipulation. There is a simple test suite (can be enlarged). wfm_to_df_functions.py: collection of functions where wmf are transformed to data frames for manipulation. Not used at the moment. Possible candidate for deletion. mctrk_functions.py: for manipulation of MC true tracks. Not being used at the moment (reconstruction does not use true variables) but eventually useful. peak_functions.py: to be revised in next cycle, associated to Irene. pmaps_functions.py: to be revised in next cycle, associated to Irene. 13

18 14 Chapter 3. Core modules

19 CHAPTER 4 Indices and tables genindex modindex search 15

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

Getting the files for the first time...2. Making Changes, Commiting them and Pull Requests:...5. Update your repository from the upstream master... Table of Contents Getting the files for the first time...2 Making Changes, Commiting them and Pull Requests:...5 Update your repository from the upstream master...8 Making a new branch (for leads, do this

More information

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

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 ILD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 1/36 Git Tutorial André Sailer CERN-EP-LCD ILD Technical Meeting April 24, 2017 LD Technical Meeting, Apr 24, 2017 A. Sailer: Git Tutorial 2/36

More information

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

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read) 1 For the remainder of the class today, I want to introduce you to a topic we will spend one or two more classes discussing and that is source code control or version control. What is version control?

More information

Using GitHub to Share with SparkFun a

Using GitHub to Share with SparkFun a Using GitHub to Share with SparkFun a learn.sparkfun.com tutorial Available online at: http://sfe.io/t52 Contents Introduction Gitting Started Forking a Repository Committing, Pushing and Pulling Syncing

More information

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

CS 520: VCS and Git. Intermediate Topics Ben Kushigian CS 520: VCS and Git Intermediate Topics Ben Kushigian https://people.cs.umass.edu/~rjust/courses/2017fall/cs520/2017_09_19.zip Our Goal Our Goal (Overture) Overview the basics of Git w/ an eye towards

More information

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at

Git Workbook. Self-Study Guide to Git. Lorna Mitchell. This book is for sale at Git Workbook Self-Study Guide to Git Lorna Mitchell This book is for sale at http://leanpub.com/gitworkbook This version was published on 2018-01-15 This is a Leanpub book. Leanpub empowers authors and

More information

Software Development I

Software Development I 6.148 Software Development I Two things How to write code for web apps. How to collaborate and keep track of your work. A text editor A text editor A text editor Anything that you re used to using Even

More information

A L A TEX-oriented intro to Git

A L A TEX-oriented intro to Git A L A TEX-oriented intro to Git the tex part is in the interactive demo not in the slides Danielle Amethyst Brake 22 October - 26 November, 2018 ICERM Semester on Nonlinear Algebra Inter-week collaboration

More information

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

git commit --amend git rebase <base> git reflog git checkout -b Create and check out a new branch named <branch>. Drop the -b Git Cheat Sheet Git Basics Rewriting Git History git init Create empty Git repo in specified directory. Run with no arguments to initialize the current directory as a git repository. git commit

More information

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY

USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY USING GIT FOR AUTOMATION AND COLLABORATION JUSTIN ELLIOTT - MATT HANSEN PENN STATE UNIVERSITY AGENDA Version control overview Introduction and basics of Git Advanced Git features Collaboration Automation

More information

Using Git to Manage Source RTL

Using Git to Manage Source RTL Using Git to Manage Source RTL CS250 Tutorial 1 (Version 082311) August 24, 2011 Brian Zimmer How to use this tutorial This class will be using Git for all of the labs and projects. This will allow the

More information

Github/Git Primer. Tyler Hague

Github/Git Primer. Tyler Hague Github/Git Primer Tyler Hague Why Use Github? Github keeps all of our code up to date in one place Github tracks changes so we can see what is being worked on Github has issue tracking for keeping up with

More information

Windows. Everywhere else

Windows. Everywhere else Git version control Enable native scrolling Git is a tool to manage sourcecode Never lose your coding progress again An empty folder 1/30 Windows Go to your programs overview and start Git Bash Everywhere

More information

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

Creating a Patch. Created by Carl Heymann on 2010 Sep 14 1 Created by on 2010 Sep 14 1 1. Starting a Patch To create a patch, and get it through the review process and into a main branch of a project, you can follow the following steps: Clone the project if you

More information

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system

Outline The three W s Overview of gits structure Using git Final stuff. Git. A fast distributed revision control system Git A fast distributed revision control system Nils Moschüring PhD Student (LMU) 1 The three W s What? Why? Workflow and nomenclature 2 Overview of gits structure Structure Branches 3 Using git Setting

More information

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

CPSC 491. Lecture 19 & 20: Source Code Version Control. VCS = Version Control Software SCM = Source Code Management CPSC 491 Lecture 19 & 20: Source Code Version Control VCS = Version Control Software SCM = Source Code Management Exercise: Source Code (Version) Control 1. Pretend like you don t have a version control

More information

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU)

Git. A fast distributed revision control system. Nils Moschüring PhD Student (LMU) Git A fast distributed revision control system Nils Moschüring PhD Student (LMU) Nils Moschüring PhD Student (LMU), Git 1 1 The three W s What? Why? Workflow and nomenclature 2 Overview of gits structure

More information

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

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018 Version Control September 18, 2018 Thursday (September 20) First in-class exercise On using git (today is a prelude with useful

More information

Submitting your Work using GIT

Submitting your Work using GIT Submitting your Work using GIT You will be using the git distributed source control system in order to manage and submit your assignments. Why? allows you to take snapshots of your project at safe points

More information

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

About SJTUG. SJTU *nix User Group SJTU Joyful Techie User Group About SJTUG SJTU *nix User Group SJTU Joyful Techie User Group Homepage - https://sjtug.org/ SJTUG Mirrors - https://mirrors.sjtug.sjtu.edu.cn/ GitHub - https://github.com/sjtug Git Basic Tutorial Zhou

More information

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Common Git Commands Git Crash Course Teon Banek theongugl@gmail.com April 7, 2016 Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18 Outline 1 Introduction About Git Setup 2 Basic Usage Trees Branches

More information

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

The Old World. Have you ever had to collaborate on a project by What the Git? The Old World Have you ever had to collaborate on a project by Shuttling a USB drive back and forth Using Dropbox E-mailing your document around Have you ever accidentally deleted someone

More information

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

Lecture 3: Processing Language Data, Git/GitHub. LING 1340/2340: Data Science for Linguists Na-Rae Han Lecture 3: Processing Language Data, Git/GitHub LING 1340/2340: Data Science for Linguists Na-Rae Han Objectives What do linguistic data look like? Homework 1: What did you process? How does collaborating

More information

Introduction, Instructions and Conventions

Introduction, Instructions and Conventions Encodo Systems AG Garnmarkt 1 8400 Winterthur Telephone +41 52 511 80 80 www.encodo.com Encodo GIT handbook Introduction, Instructions and Conventions Abstract This document is an introduction to using

More information

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

FPLLL. Contributing. Martin R. Albrecht 2017/07/06 FPLLL Contributing Martin R. Albrecht 2017/07/06 Outline Communication Setup Reporting Bugs Topic Branches and Pull Requests How to Get your Pull Request Accepted Documentation Overview All contributions

More information

RSARTE Git Integration

RSARTE Git Integration RSARTE Git Integration Anders Ek IBM INTRODUCTION...3 EGIT BRIEF OVERVIEW...3 GETTING STARTED...6 ECLIPSE PROJECTS AND GIT REPOSITORIES...6 ACCESSING A REMOTE GIT REPOSITORY...7 IMPORTING AN EXISTING REPOSITORY...8

More information

git-flow Documentation

git-flow Documentation git-flow Documentation Release 1.0 Johan Cwiklinski Jul 14, 2017 Contents 1 Presentation 3 1.1 Conventions............................................... 4 1.2 Pre-requisites...............................................

More information

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

Git. Charles J. Geyer School of Statistics University of Minnesota. Stat 8054 Lecture Notes Git Charles J. Geyer School of Statistics University of Minnesota Stat 8054 Lecture Notes 1 Before Anything Else Tell git who you are. git config --global user.name "Charles J. Geyer" git config --global

More information

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

KTH Royal Institute of Technology SEMINAR 2-29 March Simone Stefani - KTH Royal Institute of Technology SEMINAR 2-29 March 2017 Simone Stefani - sstefani@kth.se WHAT IS THIS SEMINAR ABOUT Branching Merging and rebasing Git team workflows Pull requests and forks WHAT IS THIS

More information

Tips on how to set up a GitHub account:

Tips on how to set up a GitHub account: Tips on how to set up a GitHub account: 1. Go to the website https://github.com/, you will see the following page: Figure 1: The GitHub main webpage (before you create an account and sign in) Then choose

More information

Mike McQuaid INCLUDES 66 TECHNIQUES. Foreword by Scott Chacon MANNING

Mike McQuaid INCLUDES 66 TECHNIQUES. Foreword by Scott Chacon MANNING Mike McQuaid Foreword by Scott Chacon INCLUDES 66 TECHNIQUES MANNING Git in Practice by Mike McQuaid Chapter 13 Copyright 2014 Manning Publications brief contents PART 1 INTRODUCTION TO GIT...1 1 Local

More information

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

G E T T I N G S TA R T E D W I T H G I T G E T T I N G S TA R T E D W I T H G I T A A R O N H O O V E R & B R A D M I N C H J A N U A R Y 2 2, 2 0 1 8 1 Why use a version control system? Much of this document was blatantly cribbed from Allen

More information

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY 1 WHAT IS VERSION CONTROL? Management of changes to documents like source code, scripts, text files Provides the ability to check documents in

More information

Git, the magical version control

Git, the magical version control Git, the magical version control Git is an open-source version control system (meaning, it s free!) that allows developers to track changes made on their code files throughout the lifetime of a project.

More information

Intro to Github. Jessica Young

Intro to Github. Jessica Young Intro to Github Jessica Young jyoung22@nd.edu GitHub Basics 1. Installing GitHub and Git 2. Connecting Git and GitHub 3. Why use Git? Installing GitHub If you haven t already, create an account on GitHub

More information

USPAS Simulation of Beam and Plasma Systems Steven M. Lund, Jean-Luc Vay, Remi Lehe, Daniel Winklehner and David L. Bruhwiler Lecture: Software Version Control Instructor: David L. Bruhwiler Contributors:

More information

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015 Git all meaningful operations can be expressed in terms of the rebase command -Linus Torvalds, 2015 a talk by alum Ross Schlaikjer for the GNU/Linux Users Group Sound familiar? add commit diff init clone

More information

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

What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; What is git? Distributed Version Control System (VCS); Created by Linus Torvalds, to help with Linux development; Why should I use a VCS? Repositories Types of repositories: Private - only you and the

More information

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes

Software Development. Using GIT. Pr. Olivier Gruber. Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes Software Development 1 Using GIT Pr. Olivier Gruber olivier.gruber@imag.fr Laboratoire d'informatique de Grenoble Université de Grenoble-Alpes Overview 2 What is GIT Keeping histories of the evolution

More information

CuteFlow-V4 Documentation

CuteFlow-V4 Documentation CuteFlow-V4 Documentation Release 4.0.0 Timo Haberkern Nov 15, 2017 Contents 1 Contributing 3 1.1 Contributing Code............................................ 3 1.2 Contributing Documentation.......................................

More information

Revision control. INF5750/ Lecture 2 (Part I)

Revision control. INF5750/ Lecture 2 (Part I) Revision control INF5750/9750 - Lecture 2 (Part I) Problem area Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control Work on same

More information

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:

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: Merge combines trees, and checks out the result Pull does a fetch, then a merge If you only can remember one command: git --help Get common commands and help git --help How to use git

More information

Git Introduction CS 400. February 11, 2018

Git Introduction CS 400. February 11, 2018 Git Introduction CS 400 February 11, 2018 1 Introduction Git is one of the most popular version control system. It is a mature, actively maintained open source project originally developed in 2005 by Linus

More information

Technology Background Development environment, Skeleton and Libraries

Technology Background Development environment, Skeleton and Libraries Technology Background Development environment, Skeleton and Libraries Christian Kroiß (based on slides by Dr. Andreas Schroeder) 18.04.2013 Christian Kroiß Outline Lecture 1 I. Eclipse II. Redmine, Jenkins,

More information

Improving Your Life With Git

Improving Your Life With Git Improving Your Life With Git Lizzie Lundgren elundgren@seas.harvard.edu Graduate Student Forum 26 April 2018 Scenarios to Avoid My code was deleted from 90-day retention! Crap, I can t remember what I

More information

MOOSE-Based Application Development on GitLab

MOOSE-Based Application Development on GitLab MOOSE-Based Application Development on GitLab MOOSE Team Idaho National Laboratory February 22, 2016 Introduction The intended audience for this talk is developers of INL-hosted, MOOSE-based applications.

More information

Version control with git and Rstudio. Remko Duursma

Version control with git and Rstudio. Remko Duursma Version control with git and Rstudio Remko Duursma November 14, 2017 Contents 1 Version control with git 2 1.1 Should I learn version control?...................................... 2 1.2 Basics of git..................................................

More information

Lab 08. Command Line and Git

Lab 08. Command Line and Git Lab 08 Command Line and Git Agenda Final Project Information All Things Git! Make sure to come to lab next week for Python! Final Projects Connect 4 Arduino ios Creative AI Being on a Team - How To Maximize

More information

Git. Presenter: Haotao (Eric) Lai Contact:

Git. Presenter: Haotao (Eric) Lai Contact: Git Presenter: Haotao (Eric) Lai Contact: haotao.lai@gmail.com 1 Acknowledge images with white background is from the following link: http://marklodato.github.io/visual-git-guide/index-en.html images with

More information

Beyond git add/commit/push

Beyond git add/commit/push add Working dir commit Staging area push Local Remote Based on original version made by Alexis López @aa_lopez About us @tuxtor @edivargas jorgevargas.mx github.com/tuxtor Review traditionals commands

More information

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

Lab 01 How to Survive & Introduction to Git. Web Programming DataLab, CS, NTHU Lab 01 How to Survive & Introduction to Git Web Programming DataLab, CS, NTHU Notice These slides will focus on how to submit you code by using Git command line You can also use other Git GUI tool or built-in

More information

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

Revision Control. How can 4. Slides #4 CMPT 276 Dr. B. Fraser. Local Topology Simplified. Git Basics. Revision Control: How can 4 (or 4000) developers work on a product at once? Revision Control Revision Control Revision Control: Also called version control, source control, software configuration management. Motivation:

More information

Assumptions. GIT Commands. OS Commands

Assumptions. GIT Commands. OS Commands Many of the world s largest dev teams have adopted Git and it s not hard to see why It can handle small and large projects easily It has a tiny footprint It outclasses other version control tools It s

More information

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

API RI. Application Programming Interface Reference Implementation. Policies and Procedures Discussion API Working Group Meeting, Harris County, TX March 22-23, 2016 Policies and Procedures Discussion Developing a Mission Statement What do we do? How do we do it? Whom do we do it for? What value are we

More information

Version Control System - Git. zswu

Version Control System - Git. zswu Version Control System - Git zswu Overview Why VCS? Why Git? Using Git Personally Using Git with Others Etiquette Rules of Using Git Tools & Services Tips 2 Why VCS (1/3) How do you manage your homework?

More information

Lab Objective. Lab Assignment. Downloads and Installation

Lab Objective. Lab Assignment. Downloads and Installation How I Start Working with Git: Git Lab 01 Adapted from: (1) https://github.com/quantstack/xeus-cling (2) https://code.visualstudio.com/docs/languages/cpp Lab Objective 1. Installing and using VS Code 2.

More information

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

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy s Sylvain Bouveret, Grégory Mounié, Matthieu Moy 2017 [first].[last]@imag.fr http://recherche.noiraudes.net/resources/git/git-workflow-slides.pdf 1 / 16 Goals of the presentation Global history: multiple

More information

Git(Lab) Tutorial and Hands-On

Git(Lab) Tutorial and Hands-On Git(Lab) Tutorial and Hands-On Analysis Workshop 34th KATRIN Collaboration Meeting Institut für Kernphysik WWU Münster 21.02.2018 Git(Lab) Tutorial and Hands-On Or: Why branches aren t homeomorphic endofunctors

More information

Rubix Documentation. Release Qubole

Rubix Documentation. Release Qubole Rubix Documentation Release 0.2.12 Qubole Jul 02, 2018 Contents: 1 RubiX 3 1.1 Usecase.................................................. 3 1.2 Supported Engines and Cloud Stores..................................

More information

Version Control with GIT

Version Control with GIT Version Control with GIT Benjamin Roth CIS LMU München Benjamin Roth (CIS LMU München) Version Control with GIT 1 / 30 Version Control Version control [...] is the management of changes to documents, computer

More information

GIT tutorial. David Parsons, Soraya Arias, Thomas Calmant November, Preamble 2

GIT tutorial. David Parsons, Soraya Arias, Thomas Calmant November, Preamble 2 GIT tutorial David Parsons, Soraya Arias, Thomas Calmant November, 2017 Contents 1 Preamble 2 2 First steps 2 2.1 Basic configuration.......................................... 2 2.2 Create your very first

More information

RSARTE Git Integration

RSARTE Git Integration RSARTE Git Integration Anders Ek IBM RSARTE GIT INTEGRATION...1 INTRODUCTION...3 EGIT BRIEF OVERVIEW...3 GETTING STARTED...9 ECLIPSE PROJECTS AND GIT REPOSITORIES...9 ACCESSING A REMOTE GIT REPOSITORY...9

More information

django-konfera Documentation

django-konfera Documentation django-konfera Documentation Release 0.1 SPy o.z. Mar 21, 2017 Contents 1 Installation 3 1.1 Using Pip................................................. 3 1.2 Using the Source.............................................

More information

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han

Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook. LING 1340/2340: Data Science for Linguists Na-Rae Han Lecture 2: Data in Linguistics, Git/GitHub, Jupyter Notebook LING 1340/2340: Data Science for Linguists Na-Rae Han Objectives What do linguistic data look like? Tools: You should be taking NOTES! Git and

More information

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

Git better. Collaborative project management using Git and GitHub. Matteo Sostero March 13, Sant Anna School of Advanced Studies Git better Collaborative project management using Git and GitHub Matteo Sostero March 13, 2018 Sant Anna School of Advanced Studies Let s Git it done! These slides are a brief primer to Git, and how it

More information

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

213/513/613 Linux/Git Bootcamp. Cyrus, Eugene, Minji, Niko 213/513/613 Linux/Git Bootcamp Cyrus, Eugene, Minji, Niko Outline 1. SSH, bash, and navigating Linux 2. Using VIM 3. Setting up VS Code 4. Git SSH 1. On macos/linux: $ ssh ANDREW-ID@shark.ics.cs.cmu.edu

More information

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum

Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Introduction to Git and GitHub for Writers Workbook February 23, 2019 Peter Gruenbaum Table of Contents Preparation... 3 Exercise 1: Create a repository. Use the command line.... 4 Create a repository...

More information

Version control CSE 403

Version control CSE 403 Version control CSE 403 Goals of a version control system Keep a history of your work Explain the purpose of each change Checkpoint specific versions (known good state) Recover specific state (fix bugs,

More information

Git Resolve Conflict Using Mine Command Line

Git Resolve Conflict Using Mine Command Line Git Resolve Conflict Using Mine Command Line We'll explore what approaches there are to resolve the conflict, and then we'll Please, fix them up in the work tree, and then use 'git add/rm ' as appropriate

More information

From Commits to Collaboration: A Git Tutorial for Social Scientists

From Commits to Collaboration: A Git Tutorial for Social Scientists From Commits to Collaboration: A Git Tutorial for Social Scientists Paul Sangrey, University of Pennsylvania December 12, 2017 The Replication Crisis continues to heat up discussion across social science.

More information

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

Version Control. Second level Third level Fourth level Fifth level. - Software Development Project. January 17, 2018 Version Control Click to edit Master EECS text 2311 styles - Software Development Project Second level Third level Fourth level Fifth level January 17, 2018 1 But first, Screen Readers The software you

More information

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

Version control. with git and GitHub. Karl Broman. Biostatistics & Medical Informatics, UW Madison Version control with git and GitHub Karl Broman Biostatistics & Medical Informatics, UW Madison kbroman.org github.com/kbroman @kwbroman Course web: kbroman.org/tools4rr Slides prepared with Sam Younkin

More information

Version Control. Collaborating with git. Tim Frasier

Version Control. Collaborating with git. Tim Frasier Version Control Collaborating with git Tim Frasier Copyright Tim Frasier 2015 This work is licensed under the Creative Commons Attribution 4.0 International license. Click here for more information. Setting

More information

Git tutorial. Katie Osterried C2SM. October 22, 2015

Git tutorial. Katie Osterried C2SM. October 22, 2015 Git tutorial Katie Osterried C2SM October 22, 2015 Outline 1 What is Git and why are we switching? 2 Working with Git 3 Branching and Merging 4 Working with remote repositories 5 Recommendations Outline

More information

Revision Control. An Introduction Using Git 1/15

Revision Control. An Introduction Using Git 1/15 Revision Control An Introduction Using Git 1/15 Overview 1. What is revision control? 2. 30,000 foot view 3. Software - git and gitk 4. Setting up your own repository on onyx 2/15 What is version control?

More information

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

The Rock branching strategy is based on the Git Branching Model documented by Vincent Driessen. Overview The Rock branching strategy is based on the Git Branching Model documented by Vincent Driessen. Branches Master The master branch should always reflect the latest production-ready state, and should

More information

About CVS. 1 Version Control - what is it? why is it useful?

About CVS. 1 Version Control - what is it? why is it useful? About CVS CVS stands for Concurrent Version Control. It s free, open-source software used by multiple developers to share code, keep track of changes, and keep different versions of a project. it can be

More information

2 Initialize a git repository on your machine, add a README file, commit and push

2 Initialize a git repository on your machine, add a README file, commit and push BioHPC Git Training Demo Script First, ensure that git is installed on your machine, and you have configured an ssh key. See the main slides for instructions. To follow this demo script open a terminal

More information

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi)

A Brief Introduction to Git. Sylverie Herbert (based on slides by Hautahi Kingi) A Brief Introduction to Git Sylverie Herbert (based on slides by Hautahi Kingi) Introduction Version control is better than mailing files back and forth because: Nothing that is committed to version control

More information

Laboratorio di Programmazione. Prof. Marco Bertini

Laboratorio di Programmazione. Prof. Marco Bertini Laboratorio di Programmazione Prof. Marco Bertini marco.bertini@unifi.it http://www.micc.unifi.it/bertini/ Code versioning: techniques and tools Software versions All software has multiple versions: Each

More information

Version control CSE 403

Version control CSE 403 Version control CSE 403 Goals of a version control system Keep a history of your work Explain the purpose of each change Checkpoint specific versions (known good state) Recover specific state (fix bugs,

More information

Chapter 5. Version Control: Git

Chapter 5. Version Control: Git Chapter 5 Version Control: Git The Replication Crisis continues to heat up discussion across social science. Hence principled researchers want to make their work easy to replicate and reputable journals

More information

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014

Git Tutorial. Version: 0.2. Anders Nilsson April 1, 2014 Git Tutorial Version: 0.2 Anders Nilsson andersn@control.lth.se April 1, 2014 1 Introduction Why use git, or any other version control software to keep track of files? In short there are at least three

More information

CS 320 Introduction to Software Engineering Spring February 06, 2017

CS 320 Introduction to Software Engineering Spring February 06, 2017 CS 320 Introduction to Software Engineering Spring 2017 February 06, 2017 Recap: Software development process models Traditional models Waterfall model Iterative and incremental Prototyping Spiral model

More information

How to git with proper etiquette

How to git with proper etiquette How to git with proper etiquette Let's start fixing how we use git here in crew so our GitHub looks even more awesome and you all get experience working in a professional-like git environment. How to use

More information

FEEG Applied Programming 3 - Version Control and Git II

FEEG Applied Programming 3 - Version Control and Git II FEEG6002 - Applied Programming 3 - Version Control and Git II Richard Boardman, Sam Sinayoko 2016-10-19 Outline Learning outcomes Working with a single repository (review) Working with multiple versions

More information

CS 390 Software Engineering Lecture 5 More Git

CS 390 Software Engineering Lecture 5 More Git CS 390 Software Engineering Lecture 5 More Git Reference: Scott Chacon and Ben Straub, Pro Git, published by Apress, available at https://git-scm.com/book/en/v2. Outline Finish local repository Remote

More information

TDDC88 Lab 4 Software Configuration Management

TDDC88 Lab 4 Software Configuration Management TDDC88 Lab 4 Software Configuration Management Introduction "Version control is to programmers what the safety net is to a trapeze artist. Knowing the net is there to catch them if they fall, aerialists

More information

Introduction to distributed version control with git

Introduction to distributed version control with git Institut für theoretische Physik TU Clausthal 04.03.2013 Inhalt 1 Basics Differences to Subversion Translation of commands 2 Config Create and clone States and workflow Remote repos Branching and merging

More information

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

FAQ Q: Where/in which branch do I create new code/modify existing code? A: Q: How do I commit new changes? A: FAQ Q: Where/in which branch do I create new code/modify existing code? A: We strongly recommend only modifying the source code within the local master branch: Git Repository View Woped repository Branches

More information

Visualizing Git Workflows. A visual guide to 539 workflows

Visualizing Git Workflows. A visual guide to 539 workflows Visualizing Git Workflows A visual guide to 539 workflows Table of Contents Notation Collaboration Without Review or Branches Merge Conflicts Requesting Code Review Collaboration with Multiple Branches

More information

Git version control with Eclipse (EGit) Tutorial

Git version control with Eclipse (EGit) Tutorial Git version control with Eclipse (EGit) Tutorial 출처 : Lars Vogel http://www.vogella.com/tutorials/eclipsegit/article.html Lars Vogel Version 3.6 Copyright 2009, 2010, 2011, 2012, 2013, 2014 Lars Vogel

More information

Introduction to Supercomputing

Introduction to Supercomputing Introduction to Supercomputing TMA4280 Introduction to development tools 0.1 Development tools During this course, only the make tool, compilers, and the GIT tool will be used for the sake of simplicity:

More information

Git GitHub & secrets

Git GitHub & secrets Git&GitHub secrets git branch -D local-branch git push origin :local-branch Much like James Cameron s Avatar, Git doesn t make any goddamn sense This talk throws a ton of stuff at you This talk throws

More information

Revision control systems (RCS) and. Subversion

Revision control systems (RCS) and. Subversion Revision control systems (RCS) and Subversion Problem area Software projects with multiple developers need to coordinate and synchronize the source code Approaches to version control Work on same computer

More information

Revision Control and GIT

Revision Control and GIT Revision Control and GIT On UD HPC Community Clusters William Totten Network & Systems Services Why use revision control You can go back in time It makes it easy to try things out which might not work

More information

Version Control for Fun and Profit

Version Control for Fun and Profit Version Control for Fun and Profit Chris Brady Heather Ratcliffe The Angry Penguin, used under creative commons licence from Swantje Hess and Jannis Pohlmann. Warwick RSE 30/11/2017 Version control 30/11/2017

More information

Tizen/Artik IoT Practice Part 4 Open Source Development

Tizen/Artik IoT Practice Part 4 Open Source Development 1 Tizen/Artik IoT Practice Part 4 Open Source Development Sungkyunkwan University Contents 2 SCM Tool: Git Version Management Local & Remote Repository Branch Management Github Contribution Process Issue

More information

Fundamentals of Git 1

Fundamentals of Git 1 Fundamentals of Git 1 Outline History of Git Distributed V.S Centralized Version Control Getting started Branching and Merging Working with remote Summary 2 A Brief History of Git Linus uses BitKeeper

More information

Software Project (Lecture 4): Git & Github

Software Project (Lecture 4): Git & Github Software Project (Lecture 4): Git & Github Wouter Swierstra, Atze Dijkstra Feb 2016 Wouter Swierstra, Atze Dijkstra Software Project (Lecture 4): Git & Github Feb 2016 1 / 45 Wouter Swierstra, Atze Dijkstra

More information