Git. EVEN more basic (for business people)

Post on 27-Jun-2015

138 views 1 download

Tags:

description

this slide is for a lecture, teaching business people to managing their html, image source code by Git.

Transcript of Git. EVEN more basic (for business people)

Ver.2 for teamsite management

Nguyen Minh Tuan @FSS

File management

Git solution

Install & try

Workflow

File management

Git solution

Install & try

Workflow

How are you

Managing your files

Folder based File management?

Newest?

Where was changed?

Rollback?

I modified file A and upped to server, please download

DON’T TOUCH! I am modifying it

We want to release. Send us the newest, and stop your service!

This version has problem. Please undo Mr. A, Ms. B, Ms. C’s modification ASAP

Where did you change? Please mark it, or note some where

Version control

File management

Git solution

Install & try

Workflow

Take snapshots of files in every version (commit)

5W1H info in every version (commit)

Commit #4 (newest)

Commit #1 (oldest) Commit #2 Commit #3

Who created this commit (author)

What was modified (files)

Where was modified (detail)

When was this modification made (time)

Why does this modification need (message)

How is it related to other commits (parents)

1 2 3 4

Get Get Have

Can Revert to any previous version

How it works?

remote repo

A

How it works?

Local repo 1

A

remote repo

A

clone

How it works?

Local repo 1

A

A’ Modify A => A’

remote repo

A

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

A

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

A

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

A’

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

Local repo 2

A

A’

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

Local repo 2

Pull

A’

A’

How it works?

Everyone with permission from everywhere can get the newest version and modify history of that files whenever they need

File management

Git solution

Install & try

Workflow

Tools

Black console Can do everything Need to remember commands I rarely use it.

SourceTree A GUI client for GIT Don’t need to remember commands Easy to use, confirm modifications

Install

http://www.sourcetreeapp.com/

https://git.dev.rakuten.com/projects/LOTT/repos/teamsite/browse

Change local directory (where you want to save to) if need

After clone

Add/ modify something (add file 1)

Move modified files from “working” to “staged”

Click “Commit”

add your comment ( what did you change, why, where, etc )

Select your branches (master) to confirm the change

(push) to update to server

Select your branches (master) to confirm the change

(push) to update to server

Start a new modification?

1. Click (pull) to get latest version

2. Confirm source and (OK)

Confirm the difference (if required)

Start modification, test & save

Confirm modification (if required)

Lines added + some contents

Lines removed + some contents

No change some contents

Confirm modification => commit & push

File management

Git solution

Install & try

Workflow

clone modify

Add to stage

commit

pull

push

pull Get the latest source code

Add modification

Select what to update to server

Decide what to update with some note

Confirm again if there is any change?

Update to server

1 time

start

end

Trouble?

clone modify

Add to stage

commit

pull

push

pull

1 time

start

end

Conflict

Other people modified the same file and push to server after your last pull

Modify (resolve conflict) and add to stage again