VCS VERSION CONTROL SYSTEMS

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

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

Git. Presenter: Haotao (Eric) Lai Contact:

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

Version Control: Gitting Started

Version Control with GIT

Computer Science Design I Version Control with 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:

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

Fundamentals of Git 1

Submitting your Work using GIT

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

Version Control System - Git. zswu

GIT. CS 490MT/5555, Spring 2017, Yongjie Zheng

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

Git Introduction CS 400. February 11, 2018

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

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

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

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

Git, the magical version control

Outline. Version Control System (VCS) basics Git terminology & concepts Basic Git commands Branches in Git Git over the network (time permitting)

Version Control Systems

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

Git. Ľubomír Prda. IT4Innovations.

CSE 391 Lecture 9. Version control with Git

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

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

Algorithm Engineering

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

Introduction to GIT. Jordi Blasco 14 Oct 2011

Git for Version Control

Version control with Git.

Software Project (Lecture 4): Git & Github

Outline. Introduction to Version Control Systems Origins of Git Git terminology & concepts Basic Git commands Branches in Git Git over the network

License. Introduction to Version Control with Git. Local Version Control Systems. Why Use Version Control?

Source Code Management wih git

Introduction to Version Control with Git

Assumptions. GIT Commands. OS Commands

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

Beyond git add/commit/push

Introduction to Supercomputing

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

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

Introduction to distributed version control with git

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

Advanced Git. Luc Sarzyniec. Xilopix, February / 88

Distributed Version Control (with Git)

Being More Productive with Git

GETTING STARTED WITH. Michael Lessard Senior Solutions Architect June 2017

Version Control with Git

Git for Subversion users

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

1/20/13 Git tutorial. Git tutorial. Mike Nolta. file:///users/nolta/github/reveal.js/git.html?print-paper#/ 1/31

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

Version Control. Version Control

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

Git version control with Eclipse (EGit) Tutorial

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

1. Git. Robert Snapp

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

Introduction to Version Control

Version Control with Git

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

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

GIT FOR SYSTEM ADMINS JUSTIN ELLIOTT PENN STATE UNIVERSITY

MOOSE-Based Application Development on GitLab

! #Running this command from the top directory of your project will add all your changes."! $ git add."

an introduction to git

Windows. Everywhere else

CS 390 Software Engineering Lecture 4 - Git

Revision Control and GIT

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

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

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

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

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

Introduction to GIT. The distributed SCM

Basics of Git GitHub

Git(Lab) Tutorial and Hands-On

CS314 Software Engineering Configuration Management


Git for (not-so) dummies

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

LAB MANUAL GIT BY PRATIK JAIN. To start with git bash, we need to authenticate ourselves so that for every commit, git can use this information.

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

Git for Newbies. ComMouse Dongyue Studio

A BASIC UNDERSTANDING OF VERSION CONTROL

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

Chapter 5. Version Control: Git

Introduction to Git For Groups

AIS Grid School 2015

Git tutorial. Katie Osterried C2SM. October 22, 2015

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

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.

CS 390 Software Engineering Lecture 5 More Git

Barry Grant

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

Git tips. Some tips to use Git.

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

Transcription:

VCS VERSION CONTROL SYSTEMS http://goo.gl/1tc7oh http://waynelkh.github.io/sa-git 1

WHO AM I? NCTU-CSCC TA wnlee 2

WHAT IS "VERION CONTROL" Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. 3. 1

Without Version Control

# 2015-11-10 cp -r project project.bak # 2015-11-11 cp -r project project.bak1 # 2015-11-12 cp -r project project.bak2 # 2015-11-15 cp -r project project.bak3 3. 2

Local Version Control Systems 3. 3

Centralized Version Control Systems 4. 1

Distributed Version Control Systems 4. 2

4. 3 GIT Distributed Version Control Systems 5. 1

A Short History of Git Linus Torvalds (the creator of Linux) Source Control Management ~2005 BitKeeper 2005~ Git

6. 1 Git Basic Snapshots, Not Differences Nearly Every Operation Is Local Git Has Integrity Git Generally Only Adds Data

7. 1 HOW TO INSTALL $ pkg install git other os 8. 1

8. 2

GETTING STARTED git config --global user.email "you@example.com" git config --global user.name "Name" # global config in ~/.gitconfig 9. 1

$ git init $ git add [file] $ git commit Getting a Git Repository

The Three States 9. 2

The lifecycle of the status of your files 10. 1

10. 2.gitignore # no.a files *.a # but do track lib.a, even though you're ignoring.a files above!lib.a # only ignore the TODO file in the current directory, not subdir/todo /TODO # ignore all files in the build/ directory build/ # ignore doc/notes.txt, but not doc/server/arch.txt doc/*.txt # ignore all.pdf files in the doc/ directory doc/**/*.pdf gitignore.io

11. 1 git add $ git add file file1... $ git add directory $ git add. Add file contents to the index

12. 1 git rm Add file contents to the index $ git rm [file] # only remove files from the index (untrack the file) $ git rm --cached [file]

12. 2 git mv $ git mv file_from file_to # equivalent to $ mv file_from file_to $ git rm file_from $ git add file_to Add file contents to the index

12. 3 git commit $ git commit -a: stage all modified and deleted path -m: use the given message as the commit message --amend: Replace the tip of the current branch by creating a new comm

12. 4 git status $ git status -s M README.md # updated in index D run.sh # deleted from index R src/main.js # renamed in index A src/index.html # added to index?? src/reademe.md # untracked

13. 1 git log $ git log --all --graph commit 405251d689b10aba987a081589b334426968e2ac Author: wnlee wnlee@cs.nctu.edu.tw Date: Thu Nov 13 15:22:07 2015 +0800 Initial commit $ git log --graph --pretty=format:'%cred%h%creset -%C(yellow)%d%Crese $ git config --global alias.lg "log --graph --pretty=format:'%cred%h% log formats

13. 2 git diff git diff [commit] [commit] [file-path] --cached/--staged --word-diff diff

13. 3 Undoing Things # Change preview commit again $ git commit --amend # Unstaging a Staged File $ git reset HEAD file # Unmodifying a Modified File $ git checkout -- file

14. 1 git branch Branching means you diverge from the main line of development and continue to do work without messing with that main line

git branch 15. 1

15. 2 git branch # List, create, or delete branches $ git branch $ git branch [branch_name] $ git branch -d [branch_name] # switch to the branch $ git checkout [branch name] # create branch and switch to the branch $ git checkout -b [branch name]

15. 3 git merge merge a branch into your current branch (HEAD) conflict Fast-forward Merge made by the 'recursive' strategy. Merge conflict

16. 1 Merge Conflicts Fix Conflicts git add git commit

16. 2 git rebase Forward-port local commits to the updated upstream head # origin A---B---C topic (HEAD) / D---E---F---G master # git rebase master A'--B'--C' topic / D---E---F---G master

17. 1 git rebase -i [commit] pick = use commit reword = use commit, but edit the commit message edit = use commit, but stop for amending squash = use commit, but meld into previous commit fixup = like "squash", but discard this commit's log message

17. 2 git blame show what revision and author last modified each line of a file git show Show various types of objects

18. 1 git stash Stash the changes in a dirty working directory away git tag Show various types of objects

18. 2 git reset Reset current HEAD to the specified state

18. 3 GIT REMOTE 19. 1

19. 2

19. 3

git clone Clone a repository into a new directory git remote manage set of tracked repositories

20. 1 git fetch Download objects and refs from another repository git pull git pull = git fetch + merge

20. 2 git push Update remote refs along with associated objects

20. 3 The Protocols Local Protocol - file://, /path/project.git The HTTPS Protocols - https:// The GIT Protocols - git:// The SSH Protocol - ssh:// Protocols

21. 1 GITHUB 22

REFERENCE Git Pro Manual Page github learngitbranching Git 連猴子都能懂的 入門指南 23

THE END Q & A 24

THEMES Black (default) - White - League - Sky - Beige - Simple Serif - Blood - Night - Moon - Solarized 25