Git. EVEN more basic (for business people)

45
Ver.2 for teamsite management Nguyen Minh Tuan @FSS

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)

Page 1: Git. EVEN more basic (for business people)

Ver.2 for teamsite management

Nguyen Minh Tuan @FSS

Page 2: Git. EVEN more basic (for business people)

File management

Git solution

Install & try

Workflow

Page 3: Git. EVEN more basic (for business people)

File management

Git solution

Install & try

Workflow

Page 4: Git. EVEN more basic (for business people)

How are you

Managing your files

Page 5: Git. EVEN more basic (for business people)

Folder based File management?

Page 6: Git. EVEN more basic (for business people)
Page 7: Git. EVEN more basic (for business people)

Newest?

Where was changed?

Rollback?

Page 8: Git. EVEN more basic (for business people)
Page 9: Git. EVEN more basic (for business people)

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

Page 10: Git. EVEN more basic (for business people)

Version control

Page 11: Git. EVEN more basic (for business people)

File management

Git solution

Install & try

Workflow

Page 12: Git. EVEN more basic (for business people)

Take snapshots of files in every version (commit)

Page 13: Git. EVEN more basic (for business people)

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)

Page 14: Git. EVEN more basic (for business people)
Page 15: Git. EVEN more basic (for business people)

1 2 3 4

Get Get Have

Can Revert to any previous version

Page 16: Git. EVEN more basic (for business people)

How it works?

remote repo

A

Page 17: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A

remote repo

A

clone

Page 18: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A

A’ Modify A => A’

remote repo

A

Page 19: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

A

Page 20: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

A

Page 21: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

A’

Page 22: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

Local repo 2

A

A’

Page 23: Git. EVEN more basic (for business people)

How it works?

Local repo 1

A’

A’ Modify A => A’

Commit

remote repo

Push

Local repo 2

Pull

A’

A’

Page 24: Git. EVEN more basic (for business people)

How it works?

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

Page 25: Git. EVEN more basic (for business people)

File management

Git solution

Install & try

Workflow

Page 26: Git. EVEN more basic (for business people)

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

Page 27: Git. EVEN more basic (for business people)

Install

http://www.sourcetreeapp.com/

Page 28: Git. EVEN more basic (for business people)

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

Page 29: Git. EVEN more basic (for business people)

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

Page 30: Git. EVEN more basic (for business people)

After clone

Page 31: Git. EVEN more basic (for business people)

Add/ modify something (add file 1)

Page 32: Git. EVEN more basic (for business people)

Move modified files from “working” to “staged”

Click “Commit”

Page 33: Git. EVEN more basic (for business people)

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

Page 34: Git. EVEN more basic (for business people)

Select your branches (master) to confirm the change

(push) to update to server

Page 35: Git. EVEN more basic (for business people)

Select your branches (master) to confirm the change

(push) to update to server

Page 36: Git. EVEN more basic (for business people)

Start a new modification?

1. Click (pull) to get latest version

2. Confirm source and (OK)

Page 37: Git. EVEN more basic (for business people)

Confirm the difference (if required)

Page 38: Git. EVEN more basic (for business people)

Start modification, test & save

Page 39: Git. EVEN more basic (for business people)

Confirm modification (if required)

Page 40: Git. EVEN more basic (for business people)

Lines added + some contents

Lines removed + some contents

No change some contents

Confirm modification => commit & push

Page 41: Git. EVEN more basic (for business people)

File management

Git solution

Install & try

Workflow

Page 42: Git. EVEN more basic (for business people)

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

Page 43: Git. EVEN more basic (for business people)

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

Page 44: Git. EVEN more basic (for business people)
Page 45: Git. EVEN more basic (for business people)

Modify (resolve conflict) and add to stage again