lab 2: trello & git · exercise 1: my favorite things 1. create a new board (my favorite...

48
Lab 2: Trello & Git Software Engineering Lab CSE4006: Software Engineering Except where otherwise noted, the contents of this document are Copyright 2018 Gayeon Kim, Gwanggyu Choi, Youn-geun Ahn, Hakjin Lee and Scott Uk-Jin Lee All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without author’s expressed written permission.

Upload: others

Post on 26-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Lab 2: Trello & Git

Software Engineering Lab

CSE4006: Software Engineering

Except where otherwise noted, the contents of this document are Copyright 2018 Gayeon Kim, Gwanggyu Choi,Youn-geun Ahn, Hakjin Lee and Scott Uk-Jin Lee All rights reserved. Any redistribution, reproduction,transmission, or storage of part or all of the contents in any form is prohibited without author’s expressedwritten permission.

Page 2: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Trello

Page 3: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Sign up

https://trello.com/signup

Page 4: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Create a new team & board

• After Log in

Click

Page 5: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Create a new team & board

• Create a new Team

Click

Input Team name

Input Description(Optional)

Page 6: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Create a new team & board

• Create new Board

Click

Input Board title

Click

Page 7: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Board

Page 8: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Add new List & Card

• Create a new List

Page 9: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Add new List & Card

• Create a new Card

Click

Input Card Name

Click

Page 10: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Card

• Card Structure

Description

Add Comment

OtherElements

ActionsComments

Page 11: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Move Card & List

• Drag & Drop

Move Card

Move List

Page 12: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Store the Card & List

• Move List to ‘Archive’

Click

Click

Page 13: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Store the Card & List

• Move Card to ‘Archive’

Click

Page 14: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Delete or Restore ‘Archived Items’

Click

Click

Page 15: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Delete or Restore ‘Archived Items’

Archived Cards Archived Lists

Page 16: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Exercise 1: My Favorite Things

1. Create a new board(My Favorite Things)

2. Create new Lists(Food, Music, Movie, Hobby)

3. Add new Cards to the Lists

4. Add Labels to the Food Cards

5. Add Lyrics(Comment) to the Music Cards

6. Add Image(Attachment) to the Movie Cards

7. Add Checklist and Due Date to the Hobby Cards

8. Delete a Music Card

You can see the Example board(https://trello.com/b/EW9ILdAa)

Page 17: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Exercise 1: My Favorite Things• Example

Page 18: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Exercise 1: My Favorite Things• Example(Label)

Page 19: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Exercise 1: My Favorite Things• Example(Checklist & Due Date)

Page 20: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git

Page 21: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

VCS(Version Control System)

Database for ‘Version’

Page 22: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Why use VCS?

• Collaboration

• Backup

• Tracking source code

• Tracking what happened

• Reduce side-effect when you develop a new module

Page 23: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Centralized Version Control

Remote Team Repository(SVN)

Work Space(PC)

Page 24: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Distributed VC(Team-Scale)

Work Space(PC)

Remote Team Repository(Github)

LocalRepository(PC)

Page 25: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Distributed VC(Project-Scale)

Remote Project Repository(Github)

Remote Team Repository(Github)

Local Repository(PC)

Local Repository(PC)

Page 26: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git Workflow

(Staging Area)

Page 27: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git Install

• OS X• http://sourceforge.net/projects/git-osx-installer/

• Windows• http://msysgit.github.com/

• Linux• $ apt-get install git

Page 28: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

• Sign up https://github.com

Page 29: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

• Sign up

Must use hanyang.ac.kr(for private repository)

Click

Page 30: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

• Sign up

Click

Page 31: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github Education

https://education.github.com/pack

Click

Page 32: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github Education

https://education.github.com/pack

Click

Page 33: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github Education

Click

Page 34: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

• Create new remote repository

Click (if you are already registered in GitHub)

Click (if you are new GitHub user)

Page 35: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

Check to Private

Repository Name

Check

Click

Page 36: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Github

Remote Repository URL

Page 37: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Work Space

git init

Set current directory to Git work space

Page 38: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Work Space

git config

git config sets your user information which is used for authentication to access private remote repository.

Page 39: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Work Space

git remote add / git pullNaming Remote Repository(my_remote_repo https://github.com/frebern/SE-2017.git)

Pull from my_remote_repo‘s master branch

README.md pulled.* Pull = Fetch + Merge(i.e. Receive current remote repository

+ Merge them to my local repository)

Page 40: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Staging Area

.git

‘.git’ has index of files and changes.

Page 41: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Staging Area

Display current HEAD commit& Tracked/Untracked files

git status

Page 42: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Staging Area

Add file to Staging Area(index)

git add

Page 43: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Local Repository

git commit

Commit all added changes & save to Local Repository

Page 44: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Git - Remote Repository

git push

Push Local Repository to Remote Repository

HelloGit.txt added to Remote Repository

Page 45: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Basic Work Flow

1. git init

2. git remote add [repoName] [url]

3. git pull [repoName] [branch(e.g. master)]

4. Working…

5. git add *

6. git commit –m “commit message”

7. git push [repoName] [branch(e.g. master)]

8. Repeat 3~7

Page 46: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

Exercise 2

1. Create an remote repository

2. Pull remote repository to your workspace.(if you can’t pull them, try --allow-unrelated-histories option)

3. Create a program if you input “1” then print your name.

4. Add & Commit to local repository

5. Push them to remote repository(if you can’t push them, try -f option)

6. Add function which print your introduce when you input “2”

7. Update your remote repository

It’s double dash - -

Page 47: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

+ Bonus

• Codes can version controlled by git easily.

• But, when you use documents(.doc, .key, …), it’s quite difficult to version control.

Can’t see document.docx

Page 48: Lab 2: Trello & Git · Exercise 1: My Favorite Things 1. Create a new board (My Favorite Things) 2. Create new Lists (Food, Music, Movie, Hobby) 3. Add new Cards to the Lists

+ Bonus

• We need to do tracking who changes which line of docs at SE project.

• Then, How can we achieve this?(You don’t need to entangle with git or GitHub)

• Upload your own opinion to your GitHub repository.(There may exist various solutions.)