Code Repository. P Blanchfield

Similar documents
Intro to Github. Jessica Young

Software Project (Lecture 4): Git & Github

Software Development I

Submitting your Work using GIT

Getting started with GitHub

GIT. A free and open source distributed version control system. User Guide. January, Department of Computer Science and Engineering

Revision Control and GIT

Version Control with Git ME 461 Fall 2018

Object Oriented Programming. Week 1 Part 2 Git and egit

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

Tips on how to set up a GitHub account:

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

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

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

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

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

Git Setup Help using GitKraken (CSE 154)

Version Control System GIT

CS314 Software Engineering Configuration Management

Git for Newbies. ComMouse Dongyue Studio

Managing Network Configurations with Git and GitLab

Lab Exercise Git: A distributed version control system

Sample Spark Web-App. Overview. Prerequisites

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

A brief introduction to the GitLab service at the department

A L A TEX-oriented intro to Git

Online Remote Repositories

Distributed Version Control

Version control with git and Rstudio. Remko Duursma

Branching and Merging

CSE 391 Lecture 9. Version control with Git

Improving Your Life With Git

Version Control with GIT

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


CSC 2700: Scientific Computing

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

Make sure to mark it private. Make sure to make it a Mercurial one and not a Git one.

Review Version Control Concepts

How to git with proper etiquette

Version control system (VCS)

Using GitHub to Share with SparkFun a

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

CSE 332: Data Structures and Parallelism Winter 2019 Setting Up Your CSE 332 Environment

Git for Subversion users

Github/Git Primer. Tyler Hague

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

CSCE UVM Hands-on Session-1 Pre-Work

DEVNET Introduction to Git. Ashley Roach Principal Engineer Evangelist

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

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

School of Computing Science Gitlab Platform - User Notes

GitHub Classroom. Click Sign up in to top right of the page, and the following dialog is displayed.

Using Git to Manage I&T Projects and for Code & Design File CMVC

Git, the magical version control

Revision control. INF5750/ Lecture 2 (Part I)

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

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

Use git rm to remove files from workspace

CSE 331 Software Design & Implementation

Using Git and GitLab: Your first steps. Maurício

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

A quick (and maybe practical) guide to Git and version control. By Jay Johnson

Using Git to Manage Source RTL

CS 320 Introduction to Software Engineering Spring February 06, 2017

So#ware(Project. Lecture'4. Wouter'Swierstra. So#ware(project( (Lecture(4 1

Git. Presenter: Haotao (Eric) Lai Contact:

CSCI 350 Virtual Machine Setup Guide

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Lesson 7: Recipe Display Application Setup Workspace

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

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

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

Human-Computer Interaction Design

A short tutorial on Git. Servesh Muralidharan 4 March 2014

An introduction to Git and GitHub

Git tutorial. Katie Osterried C2SM. October 22, 2015

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

Cloud platforms T Mobile Systems Programming

Cloud platforms. T Mobile Systems Programming

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

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

Table of Contents. Concepts


FEEG Applied Programming 3 - Version Control and Git II

Git version control with Eclipse (EGit) Tutorial

Software Engineering

Revision Control. An Introduction Using Git 1/15

AIS Grid School 2015

EECS 470 Lab 4. Version Control System. Friday, 31 st January, 2014

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

What is Git? What is Git? Version Control. Barry Grant

Shell Project Part 1 (140 points)

Version control CSE 403

Lab 08. Command Line and Git

Windows. Everywhere else

Version control CSE 403

CS 390 Software Engineering Lecture 5 More Git

Using git to download and update BOUT++

Version Control with Git

Transcription:

Code Repository P Blanchfield

Local Copy Methods There are two main ways of handling Code Repositories Local copy Remote only When you have a remote only system like SVN You copy to your local machine But you have to commit to the remote machine. When you have a local copy of the repository You clone the origin repository You can create new branches on your own copy You can add to your local copy of master and/or your local branches Then you commit them locally Then push them to the on line repository 2

Major advantage You can commit role back and merge branches on your own computer So you can still work where there is no Internet connection You don t get in danger of disturbing other people s work with your failure Until you sort yours out But you must regularly push back to the origin So that differences can be found and resolved. 3

Using GitHub GitHub is a version of Git It has advantages And disadvantages over other implementations We have GitLab available in the school https://projects.cs.nott.ac.uk/users/sign_in You get GitHub at https://github.com/ The advantage of using GitHub is that the world can see your work The advantage of using our GitLab is that the world can t Though you can make private repositories on GitHub now without paying 4

There is also BitBucket https://bitbucket.org/ I have never used it It used to have the advantage that free users could do private repositories It is still a Git repository and git commands work with it 5

Git Commands That means git documentation https://git-scm.com/documentation Works for github, gitlab and bitbucket Personally I prefer the GitHub layout Also GitHub for windows can be really useful https://desktop.github.com/ It will set up your projects with an SSH key without you having to work at it You can then use Poshgit as a command line access to your local repository However GitKraken is a better windows local git interface https://www.gitkraken.com/ 6

So what to do? Choose Git for your repository solution But keep it online where you like Locate your local repository somewhere safe I usually make a local repository in a workspace directory This was a habit from GitHub for Windows it does not need to be here Then I clone my repositories to this place 7

The easiest way Load GitHub and get a user account I will demo this in class Download GitHub for windows to your local machine Select PoshGit as the one you want Or Download GitKraken Make the connection to your on line repo. 8

Those of you who have not done it before, though I think most of you are set up already When using GitHub To clone your software If you have set it up through GitHub for Windows Click on the button clone or download Choose open in desktop Otherwise In your git command window Type ssh-keygen 9

Copy the public key Open in a text editor here I use Notepad and copy all. 10

On the GitHub page Select your profile And click on the settings option 11

On the settings page Select SSH and GPG keys then New SSH key 12

Next Name your key And paste the public key in ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiAb2NEVohYrk57SQQnId5c7ZHp8 6JMSQJF6ppkM9FPX2RkKFvsxz/tafMNWjU2p0t7IC8McJnARCLvh1w0bDxkE 8UPTiMM+wBzW6tj90vGwJT5g/f6MpRKa6NrhZ/JiLlM/c2rYhc2pvMwcZQUlao BezjgR+5mpl/8aYEoPxD3RwU1IeeUkj9bZlRmbpIPvWvHFMNgPXu4uuO/sCP EP6FaUsBoFPA+Hn1WJm4YaetCSh4DJAXEeRS+pJCuDYy9SGimyXQaVVrBm 7TSELLN45Y+qVb/pz1LxIq87Ux38xBsLYlPRdlIwqj4U6fDib9fIe+Q1oGNyVoz C8yBOh4/bRh pxb@orkney 13

Now back to the project repo And select download again This time copy to clipboard 14

Back on your git shell This time open it And go to the workspace or wherever you have your working directory Type git clone then paste the repository location 15

Empty Repository Actually you may have an empty repository If all you have done is set it up and clone it Good to have a ReadMe.md file to explain what you are doing Good place to: Describe your project Mark up what the requirements are Also link to other repositories Documents etc. Can also create a Wiki and a related Web page You can create your ReadMe on your desk top And make your first push 16

In a git shell You git add * git commit m created a ReadMe git push origin master In GitHub for windows there is a synchronise button In GitKraken you can do it visually Note in posh-git the colours tell you things Red stuff has changed and not been added Green added but not commited 17

Now on GitHub You should be able to see what you have done (press refresh if necessary) 18

Graphs are useful The one I like most is the network On GitHub choose the Graphs tab and select network Nothing much to see yet but it will be quite helpful later on 19

On GitLab You get the same graph in the Repository tab under Network 20

If you use GitKraken The network is visible from the desktop And it updates when the origin repository changes 21

Now let us add some code Actually I am going to set up a Unity project first The first thing I did was to create a subfolder 22

I need to create a Trello To plan my project 23

I start with the backlog Subdivide the objectives Prioritise them Customer job Estimate times Programmer/designer job I have only started the process Colours show the type of task Yellow done in Unity Red done in C# code 24

Now allocate tasks I am the only developer so guess it is me I check out the task I want to start with and set one to doing I have set myself a due date of Feb 16 th for this, having set Feb 28 as the Sprint deadline. 25

But first I will create a new branch I want to keep all my developments separate So the one for creating the board I am going to put in a branch called AddBoard You may want to use a system that tells you who did what In a git shell I enter git checkout b AddBoard -b allows it to create a local branch 26

Now start Unity My first Test is Can I make a square and set up an orthographic camera And see the square from the camera. I make a new project in my workspace I save a scene I add an orthographic camera I add a new material I add a directional light I colour the material I look at the game view Can I see the square No adjust square position repeat Yes task comlete 27

I can now mark this test As completed on the Trello Notice I have also realised I needed to program the squares and other graphics 28

As I passed the test I now add and commit this to the branch In git shell I type git add * To add my changes Git commit m Created a square To commit them I will now push them so I can Continue at home git push origin AddSquare This will add the branch to the on line repository 29

On origin Branch AddBoard now exists 30

On origin There is a lot more stuff 31

However I don t have a git-ignore file Unity will create large numbers of files I don t need to save Like large numbers of binary files 32

Back on the Trello I realise it is most sensible to do one of the pure coding tasks next Creating the board square class Use case the board should have an array of 52 squares Each of which has a position, and occupation value 33

So I Set up the use case on the Trello And add the description of the Unit Test 34