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

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

Git. Presenter: Haotao (Eric) Lai Contact:

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

Computer Science Design I Version Control with Git

CS 390 Software Engineering Lecture 4 - Git

Version Control with GIT

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

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

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:

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

Git tutorial. Katie Osterried C2SM. October 22, 2015

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

A BASIC UNDERSTANDING OF VERSION CONTROL

VCS VERSION CONTROL SYSTEMS

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

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

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

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

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

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

Fundamentals of Git 1

Submitting your Work using GIT

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

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

Version Control. Version Control

Beyond git add/commit/push

Git for Version Control

Version control with Git.

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

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

Advanced Operating Systems Control Versioning with GIT. Giuseppe Massari

Revision control. INF5750/ Lecture 2 (Part I)

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

Git Introduction CS 400. February 11, 2018

Source Code Management wih git

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

Introduction to Version Control

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

Version Control: Gitting Started

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

CS 390 Software Engineering Lecture 5 More Git

CSE 391 Lecture 9. Version control with Git

Assumptions. GIT Commands. OS Commands

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

Improving Your Life With Git

Use git rm to remove files from workspace

Tools for software development:

MOOSE-Based Application Development on GitLab

Introduction to GIT. Jordi Blasco 14 Oct 2011

Git. Ľubomír Prda. IT4Innovations.

Introduction to distributed version control with git

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

Introduction to GIT. The distributed SCM

Distributed Version Control (with Git)

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

Revision Control. An Introduction Using Git 1/15

1. Git. Robert Snapp

Version Control with GIT: an introduction

Lecture 6 Remotes. Sign in on the attendance sheet!

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

Git, the magical version control

Version Control System - Git. zswu

CS 261 Recitation 1 Compiling C on UNIX

Git Memento. Author: Jérémie DECOCK Contact: Revision: 0.1 Date: 20/05/2016 License: Creative Commons 4.0 (CC BY-SA 4.

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

February 2 nd Jean Parpaillon

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

Version Control Systems

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

GIT for companies Mark Struberg, INSO TU Vienna

Algorithm Engineering

Git version control with Eclipse (EGit) Tutorial

Revision Control and GIT

Introduction to Version Control with Git

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

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

Git(Lab) Tutorial and Hands-On

Chapter 5. Version Control: Git

an introduction to git

Contribute To Linux Mainline

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

Introduction to Git For Groups

How to version control like a pro: a roadmap to your reproducible & collaborative research

Revision control Advanced git

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

Version Control System GIT

Git & Github Fundamental by Rajesh Kumar.

Lecture 4 More on Commits and Branches

Git for Subversion users

CS 520: VCS and Git. Intermediate Topics Ben Kushigian

Eugene, Niko, Matt, and Oliver

Introduction, Instructions and Conventions

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

Github Webinar Documentation


Lab Objective. Lab Assignment. Downloads and Installation

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

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

Working with GIT. Florido Paganelli Lund University MNXB Florido Paganelli MNXB Working with git 1/47

Transcription:

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

Basic features Distributed version control Developed in 2005, originally for Linux kernel development Free, GNU General Public License version 2 Available for Linux, BSD, Solaris, OS X, Microsoft Windows Installation: https://git-scm.com/book/en/v2/getting-started-installing-git

Storing data as snapshots

Basic snapshotting

Areas

Working directory - file states

Basic snapshotting - summary git init:: creates a new (empty) local repository git add [path]: adds new/modified files to the staging area (next commit) git commit -m [message] : commits staged files into the local repository with the specified commit message git status: shows status of the files in the working directory git log: displays history of commits in reverse chronological order: author s name and e-mail, the date written and the commit message gitk, gitk --all: simple built-in gui for viewing history

Basic snapshotting - other useful commands git commit -a: shortcut, automatically stage all tracked, modified files and commits them git status -s (=status --short): shows short version of status.gitignore: file which defines file types ignored by git git rm: removes files git mv:: moves/renames files git gui: simple built-in gui for snapshotting git log -p, -- [filename], -N, --stat, --pretty=oneline, --pretty=format: [format], --graph, --since, -S: various log formats and filters git diff: compares the working directory to the staging area git diff --staged (=git --cached): compares staged changes to the last commit

Branching

Common ancestor: Snapshot to merge into Snapshot to merge in

Branching - summary git branch: lists all branches (-v, --merged, --no-merged) git branch [branchname]: creates new branch git checkout [branchname]: switches to a branch branchname git merge [branchname]: merges branch branchname into current branch git add [path]: stages fixed files git commit: finalizes merge - allows that only if all conflicted files have been fixed and staged git branch -d [branchname]: deletes branch branchname git tag -a [tagname] -m [message]: tags last commit

Branching - other useful commands git checkout -b [branchname]: shortcut, creates a new branch branchname and switches to its context git tag: lists all defined tags git tag -a [tagname] [commit] -m [message]: tags specified commit git show [tagname]: shows detailed information on given tag Rebasing - an alternative to merge

Remote repositories

Remote repositories - summary git clone [url]: gets a copy of an existing Git repository git branch -vv: shows list of local branches and corresponding upstream branches (if the local branch is a tracking branch) git fetch [remote-name]: downloads data to the local repository (without merging it) git push [remote-name] [branch-name]: uploads local branch to the branch in the remote repository

Remote repositories - other useful commands git clone [url] [dir]: downloads the repository into specified directory git pull [remotename]: fetches data from the server and automatically tries to merge it into the current code git remote: lists the shortnames of all specified remote handles git remote -v: lists also URLs git remote show [shortname]: shows detailed information on given remote repository git ls-remote --heads [remote-name]: lists all remote branches

Other commands

Undoing things git commit --amend: adds more files or modifications to the last commit and/or changes commit message of last commit git reset HEAD [file]: unstages file git checkout -- [file]: reverts changes in file Other useful commands: git revert [commit]: undoes the changes introduced by given commit and appends a new commit with the resulting content git reset --hard HEAD~1: removes last commit git reset --hard [commit]: resets the branch to the specified commit (all following commits are removed) (warning: git reset --hard command will delete all changes in the working directory)

Setup, help git config: various settings, e.g. --global user.name "John Doe" --global user.email johndoe@example.com --global alias.co checkout git help [cmd]: help man git [cmd]: help

References https://git-scm.com/book/en/v2 https://git-scm.com/docs https://www.atlassian.com/git/

Rebasing

Rebasing - summary git rebase [branch2]: replays all (separate) commits of the current branch (branch1) to the branch2 and makes branch1 to point to the resulting commit git checkout [branch2], git merge [branch1]: finalizes merge Other useful commands: git rebase --onto [branch1] [branch2] [branch3]: checks out the branch3, figures out the commits from the common ancestor of branch 2 and branch3, and then replays them onto branch1 git rebase -i: interactive rebase git cherry-pick [commit1] [commit2],..: applies the changes introduced by given commits one by one, recording a new commit for each