Git python core

Содержание

Слайд 2

Agenda Source Control Management (SCM) Fundamental Concepts Terms Types of Version

Agenda

Source Control Management (SCM)
Fundamental Concepts
Terms
Types of Version Control Systems
Git
Before start
Configuration
Basics
Work cycle
Branches

| Merging | Rebasing
Practical tasks
HomeWork
Слайд 3

SCM Revision control, also known as version control and source control

SCM

Revision control, also known as version control and source control (and

an aspect of software configuration management), is the management of changes to documents, computer programs, large web sites, and other collections of information.
Слайд 4

Fundamental Concepts of SCM Tracking changes Committing Revisions and Change sets

Fundamental Concepts of SCM

Tracking changes
Committing
Revisions and Change sets
Getting updates
Conflicts
Diffing (or, viewing

the differences)
Branching and merging
Слайд 5

Main terms Repository Working Copy Merging Revision

Main terms

Repository
Working Copy
Merging
Revision

Слайд 6

System version control Centralized: CVS, Perforce, SVN, Team Foundation Server (TFS) Distributed: Git, Mercurial

System version control

Centralized: CVS, Perforce, SVN, Team Foundation Server (TFS)
Distributed: Git,

Mercurial
Слайд 7

GIT Intro Git – is a distributed revision control system with

GIT Intro

Git – is a distributed revision control system with an

emphasis on speed, data integrity, and support for distributed, non-linear workflows.
Git was initially designed and developed by Linus Torvalds for Linux kernel development in 2005, and has since become the most widely adopted version control system for software development.
Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server.
Слайд 8

Before start Firstly we need to check if we have a

Before start

Firstly we need to check if we have a git

client software.
Download and install git

Linux OS
Debian Family (Debian, Ubuntu, Mint) #apt-get install git
Red Hat Family (RHEL, CentOS, Fedora) #yum install git

MS Windows OS https://git-scm.com/download/win

Слайд 9

If we need to know sth ☺ Help yourself $git help $git --help $man git-

If we need to know sth ☺

Help yourself
$git help
$git

--help
$man git-
Слайд 10

Let’s configure git ☺ Git comes with tool called git config

Let’s configure git ☺

Git comes with tool called git config
Identity
$ git

config --global user.name “Liubov Koliasa“
$ git config --global user.email lkoliasa@mail.com
Editor
$ git config --global core.editor notepad.exe
Check settings
$ git config --list
Слайд 11

Create repository git init – create an empty local repo git

Create repository

git init – create an empty local repo
git clone

– create local repo from remote repo
Слайд 12

GIT basics Git store snapshots of file system not differences!!! Almost every operation is local

GIT basics

Git store snapshots of file system not differences!!!
Almost every operation

is local
Слайд 13

Git data transport commands

Git data transport commands

Слайд 14

Must know commands! git status - Show the working tree status

Must know commands!

git status - Show the working tree status
git log

– Show commit logs
git rm – Remove files from the working tree and from the index
Слайд 15

GIT Work Cycle Clone repository git clone git init Create your

GIT Work Cycle

Clone repository
git clone
git init
Create your branch
git branch
Modify working copy
git

add
git reset
git mv
git rm
Update branch and review changes
git status
git log
git diff
git fetch
Commit changes
git commit
Push changes to repo
git push
Слайд 16

Branch A branch represents an independent line of development. Branches serve

Branch

A branch represents an independent line of development. Branches serve as

an abstraction for the edit/stage/ commit process
Commands
git branch – list of branches in local repo
git branch – create new local branch named “name”
git branch –d – delete the branch named “name”
git branch –m – rename the current branch to “name”
Слайд 17

Let’s imagine Three commits on master 1 2 git checkout –b

Let’s imagine

Three commits on master

1

2

git checkout –b iss53

3

git commit …

4

git checkout

master
git checkout –b hotfix
git commit …
Слайд 18

Merging 5 git checkout master git merge hotfix 6 7 git merge iss53

Merging

5

git checkout master
git merge hotfix

6

7

git merge iss53

Слайд 19

Rebasing 1 Some initial state 2 git checkout experiment git rebase master

Rebasing

1

Some initial state

2

git checkout experiment
git rebase master

Слайд 20

Team player / issue / bug fix philosophy

Team player / issue / bug fix philosophy

Слайд 21

Слайд 22

Clone repository https://github.com/kolyasalubov/Lv-367.PythonCore.git Add to file «ZenPython.txt» few lines and commit

Clone repository https://github.com/kolyasalubov/Lv-367.PythonCore.git
Add to file «ZenPython.txt» few lines and commit it

to local repository.
Push it to remote repository.
Make branch and checkout to it
Add few lines in the file.
Push changes to remote repo.
Merge the branch with master
Resolve conflicts, if needed
View master log.

Tasks

Слайд 23

HomeWork (online course) Play on site https://try.github.io Please register on Learn

HomeWork (online course)

Play on site https://try.github.io
Please register on Learn Git Branching:

http://learngitbranching.js.org/
and play game
Clone repo
https://github.com/kolyasalubov/Lv-416.PythonCore.git
Create branch
Push into this branch your project from HW 1
Слайд 24

References and Sources Simplified views: Everyday commands Visual guide to GIT

References and Sources

Simplified views:
Everyday commands
Visual guide to GIT
Easy version control with

GIT
Some videos
What is GIT
Overview of Branching, Cloning, Pulling, and Merging. Demo of it on Git Bash
Merge Conflicts. Git Tagging
GIT for small teams
Workflow for small teams
Advanced philosophy:
Advanced programmer guide to GIT
Version control SVN and GIT