Introduction to Git For Groups

Similar documents
Windows. Everywhere else

GIT Princípy tvorby softvéru, FMFI UK Jana Kostičová,

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

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

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

Beyond git add/commit/push

Submitting your Work using GIT

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:

VCS VERSION CONTROL SYSTEMS

Distributed Version Control Git

Version Control System - Git. zswu

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

Assumptions. GIT Commands. OS Commands

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

Revision Control and GIT

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

Effective Programming Practices for Economists. 7. Version Control, Part II: Git with a Shared Repository

Version Control 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

Source Code Management wih git

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

Software Project (Lecture 4): Git & Github

Introduction to Git and Github

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

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

Introduction to distributed version control with git

Revision Control. An Introduction Using Git 1/15

Git. Presenter: Haotao (Eric) Lai Contact:

GIT CHEAT SHEET. CONFIG --global => write to ~/.gitconfig, otherwise to.git/config. git config [--global] -l git config [--global] -e

GIT DISTRIBUTED IS THE NEW CENTRALISED

Git. Christoph Matthies Software Engineering II WS 2018/19. Enterprise Platform and Integration Concepts group

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

DEAD-SIMPLE VERSION CONTROL FOR YOUR TEAM GIT WITH MATTHEW REIDSMA GRAND VALLEY STATE UNIVERSITY

Git - A brief overview

Git version control with Eclipse (EGit) Tutorial

Git Guide. Meher Krishna Patel. Created on : Octorber, 2017 Last updated : October, More documents are freely available at PythonDSP

Fundamentals of Git 1

Revision control. INF5750/ Lecture 2 (Part I)

Praktische Aspekte der Informatik

MOOSE-Based Application Development on GitLab

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

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Tools for software development:

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

How to git with proper etiquette

Computer Science Design I Version Control with Git

Git for Subversion users

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

Crash course in version control (focusing mainly on git)

Git, the magical version control

Version Control for the 2- Pizza Team: Merge Conflicts (ELLS 9.5) Armando Fox

Git for Newbies. ComMouse Dongyue Studio

git the SCM system Jan-Simon Möller training.linuxfoundation.org

Introduction to Supercomputing

Git. A Distributed Version Control System. Carlos García Campos

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

Git. (Why not CVS?... because Git.) Karel Zak Florian Festi Bart Trojanowski December 20, 2007

Introduction to GIT. Jordi Blasco 14 Oct 2011

Using Git to Manage Source RTL

Algorithm Engineering

Distributed Version Control (with Git)

E, F. deleteall command, 352 directory structure, 350 export_data method, 353 inline_data method, 353 print_export method, 351 target directory, 351

an introduction to git

1. Git. Robert Snapp

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

Improving Your Life With Git

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

Review Version Control Concepts

Git for (not-so) dummies

How to be a git. Dominic Mitchell

Chapter 5. Version Control: Git

Git. Ľubomír Prda. IT4Innovations.

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

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

February 2 nd Jean Parpaillon

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

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

6 Git & Modularization

Version Control. Version Control

Branching and Merging

Git. It is easy to shoot your foot off with git, but also easy to revert to a previous foot and merge it with your current leg.

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

Version Control with GIT

Software Engineering

Code and data management with Git

CS 390 Software Engineering Lecture 5 More Git

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

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

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

Lecture 6 Remotes. Sign in on the attendance sheet!

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

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

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

Advanced Git. Luc Sarzyniec. Xilopix, February / 88

Software Development I

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

Tizen/Artik IoT Practice Part 4 Open Source Development

Introduction to Version Control

Gitting things done. Hands-on introduction to git niceties. Jan Urbański Ducksboard

Being More Productive with Git

Transcription:

Introduction to Git For Groups

Getting the changes made by others

Viewing old versions of your work

Working on multiple lines of development

A single person working gitlab object store git clone https://gitlab.doc.ic.ac.uk/lab1314_summer/arm11_<group_no>.git Your home directory branch label revision index workspace

Adding changes to the index git add git rm git mv git status git add git diff git mv git diff --cached <edit git add git rm to add. inside>

Git status, diff and diff --cached >git status On branch Changes to be committed: (use "git reset HEAD <file>..." to unstage) new file: modified: Added.txt Hello.txt 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: Hello.txt Untracked files: (use "git add <file>..." to include in what will be committed) NotAdded.txt

Git status, diff and diff --cached >git diff --cached Hello.txt diff --git a/hello.txt b/hello.txt index cd08755..a92b91b 100644 --- a/hello.txt +++ b/hello.txt @@ -1 +1,3 @@ Hello world! + +This is my brand new story that I've added... >git diff Hello.txt diff --git a/hello.txt b/hello.txt index a92b91b..0a7ef26 100644 --- a/hello.txt +++ b/hello.txt @@ -1,3 +1,5 @@ Hello world! This is my brand new story that I've added... + +And this is something I've written in Hello.txt but not added.

Committing Changes git commit git add

Commiting and pushing >git commit -m "Added Hello." [ 68c9ae4] Added Hello. 2 files changed, 3 insertions(+) create mode 100644 Added.txt >git push origin Counting objects: 7, done. Delta compression using up to 4 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (7/7), 590 bytes 0 bytes/s, done. Total 7 (delta 0), reused 0 (delta 0) To../tmp_remote.git/ * ->

Committing and pushing

Two people working at separate times

Two people working at separate times git clone <url> <edit> git add <file> git clone <url> origin/ origin/ git commit git push origin origin/ origin/

Two people working at separate times git fetch origin/ git merge origin/ origin/

Two people working at the same time (different files)

Two people working at the same time (different files) git clone <url> <edit file one> git add git commit git push origin git clone <url> <edit file two> git add git commit origin/

Two people working at the same time (different files) git fetch origin/ origin/ git merge origin/

Two people working at the same time (different files) git push origin git fetch git merge origin/

Two people working at the same time (same files)

Two people working at the same time (same files) >git merge origin/ Auto-merging Hello.txt CONFLICT (content): Merge conflict in Hello.txt Automatic merge failed; fix conflicts and then commit the result.

Two people working at the same time (same files) Hello world! This is the start of a great program!!! Hello world! This is the start of a great program!!! I like zebras. I like giraffes. Hello world! I hope you're listening. This is the start of a great program!!! I like elephants. Hello world! I hope you're listening. This is the start of a great program!!! <<<<<<< HEAD I like elephants. ======= I like giraffes. >>>>>>> origin/

Two people working at the same time (same files) Hello world! I hope you're listening. This is the start of a great program!!! <<<<<<< HEAD I like elephants. ======= I like giraffes. >>>>>>> origin/ <edit Hello.txt to resolve> git add Hello.txt git commit Hello world! I hope you're listening. This is the start of a great program!!! I like elephants and giraffes.

Two people working at the same time (same files) Merge remote-tracking branch 'origin/' Conflicts: Hello.txt # # It looks like you may be committing a merge. # If this is not correct, please remove the file #.git/merge_head # and try again. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # On branch # Your branch and 'origin/' have diverged, # and have 1 and 1 different commit each, respectively. # (use "git pull" to merge the remote branch into yours) # # All conflicts fixed but you are still merging. # # Changes to be committed: # modified: Hello.txt

Viewing / browsing old versions of your work gitk --all &

Viewing / browsing old versions of your work > git log spec/spec.tex commit ffba57269dcc1a12cfc929e3a4f6322931cf0f1c Author: Dr. Tristan Allwood <tora@doc.ic.ac.uk> Date: Tue May 20 12:31:59 2014 More updates to the spec. commit 93734d0101efaa6b0dfb347587284eea844b36bb Author: Dr. Tristan Allwood <tora@doc.ic.ac.uk> Date: Mon May 12 15:38:50 2014 Spec pass up to working and submission. commit e4d606286b3791b01c3636040f541502f9af196a Merge: 1976787 1f0d7c6 Author: Dr. Tristan Allwood <tora@doc.ic.ac.uk> Date: Mon May 12 11:08:18 2014 Merge remote-tracking branch 'origin/' into wip-2013 Conflicts:...

Viewing / browsing old versions of your work > git blame spec/spec.tex 61313227 cd6b4b2d 61313227 c05c8bed dfe12a56 0155868c 5a27d821 a3b7a457 a3b7a457 d87cdb9f 73bb5cc4 d87cdb9f cd6b4b2d 07215a58 07215a58 07215a58 07215a58 07215a58 07215a58 07215a58 07215a58 cd6b4b2d cd6b4b2d (Dr. Tristan (Will Jones (Dr. Tristan (Will Jones (Will Jones (Dr. Tristan (Will Jones (Dr. Tristan (Dr. Tristan (Maria (Dr. Tristan (Maria (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones (Will Jones Allwood 2013-05-19 2012-05-14 Allwood 2013-05-19 2012-04-18 2012-05-14 Allwood 2012-05-17 2012-05-18 Allwood 2013-05-17 Allwood 2013-05-17 2013-05-13 Allwood 2013-05-19 2013-05-13 2012-05-14 2012-05-18 2012-05-18 2012-05-18 2012-05-18 2012-05-18 2012-05-18 2012-05-18 2012-05-18 2012-05-14 2012-05-14 12:52:55 12:09:02 12:52:55 17:36:15 14:40:51 19:04:45 12:18:02 17:20:28 17:20:28 17:42:20 19:34:44 17:42:20 12:09:02 12:31:43 12:31:43 12:31:43 12:31:43 12:31:43 12:31:43 12:31:43 12:31:43 12:09:02 12:09:02 1) 2) 3) 4) 5) 6) 7) 8) 9) 10) 11) 12) 13) 14) 15) 16) 17) 18) 19) 20) 21) 22) 23) \documentclass[a4paper,tw \usepackage{fullpage} \usepackage{bytefield} \usepackage{graphicx} \usepackage{hyperref} \usepackage{alltt} \usepackage{amsmath} \usepackage{tabulary} \usepackage{float} \usepackage{comment} \restylefloat{table} \hypersetup{ colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue } % Macros for printing cod

Multiple Branches of Development

Multiple Branches of Development

Multiple branches of development??? origin/

Multiple branches of development git checkout -b my_awesome_fire_truck <work and commit on the fire truck branch> origin/ my_awesome_fire_truck

Multiple branches of development git checkout origin/ my_awesome_fire_truck

Multiple branches of development git push origin my_awesome_fire_truck git fetch origin/my_awesome_fire_truck git checkout my_awesome_fire_truck my_awesome_fire_truck origin/

Multiple branches of development git checkout my_awesome_fire_truck git merge my_awesome_firetruck <merge conflict> <put out fires> git add git commit my_awesome_fire_truck

Do not forget to put out the fires!

Lots of things we've seen git clone git fetch git status git merge git add git log git rm gitk all git mv gitg git diff git blame git commit git checkout -b git push git checkout

Lots of other things to investigate git checkout git cherry-pick git rebase git stash git reset git branch git remote git help <command>