Top Banner
Lab 1: Trello & Git Software Engineering Lab CSE4006: Software Engineering Except where otherwise noted, the contents of this document are Copyright 2017 Gayeon Kim, Gwanggyu Choi, Youn-geun Ahn 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.
49

Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Jul 27, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Lab 1: Trello & Git

Software Engineering Lab

CSE4006: Software Engineering

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

Page 2: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Trello

Page 3: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Sign up

https://trello.com/signup

Page 4: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Create a new team & board

• After Log in

Click

Page 5: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Create a new team & board

• Create a new Team

Click

Input Team name

Input Description(Optional)

Page 6: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Create a new team & board

• Create new Board

Click

Input Board title

Click

Page 7: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Board

Page 8: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Add new List & Card

• Create a new List

Page 9: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Add new List & Card

• Create a new Card

Click

Input Card Name

Click

Page 10: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Card

• Card Structure

Description

Add Comment

OtherElements

ActionsComments

Page 11: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Move Card & List

• Drag & Drop

Move Card

Move List

Page 12: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Store the Card & List

• Move List to ‘Archive’

Click

Click

Page 13: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Store the Card & List

• Move Card to ‘Archive’

Click

Page 14: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Delete or Restore ‘Archived Items’

Click

Click

Page 15: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Delete or Restore ‘Archived Items’

Archived Cards Archived Lists

Page 16: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

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 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Exercise 1: My Favorite Things• Example

Page 18: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Exercise 1: My Favorite Things• Example(Label)

Page 19: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

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

Page 20: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git

Page 21: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

VCS(Version Control System)

Database for ‘Version’

Page 22: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Why use VCS?

• Collaboration

• Backup

• Tracking source code

• Tracking what happened

• Reduce side-effect when you develop a new module

Page 23: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Centralized Version Control

Remote Team Repository(SVN)

Work Space(PC)

Page 24: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Distributed VC(Team-Scale)

Work Space(PC)

Remote Team Repository(Github)

LocalRepository(PC)

Page 25: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Distributed VC(Project-Scale)

Remote Project Repository(Github)

Remote Team Repository(Github)

Local Repository(PC)

Local Repository(PC)

Page 26: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git Workflow

(Staging Area)

Page 27: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git Install

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

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

• Linux• $ apt-get install git

Page 28: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

• Sign up https://github.com

Page 29: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

• Sign up

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

Click

Page 30: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

• Sign up

Click

Page 31: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github Education

https://education.github.com/pack

Click

Page 32: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github Education

https://education.github.com/pack

Click

Page 33: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github Education

Click

Page 34: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

• Create new remote repository

Click (if you are already registered in GitHub)

Click (if you are new GitHub user)

Page 35: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

Check to Private

Repository Name

Check

Click

Page 36: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Github

Remote Repository URL

Page 37: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Work Space

git init

Set current directory to Git work space

Page 38: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Work Space

git config

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

Page 39: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

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 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Staging Area

.git

‘.git’ has index of files and changes.

Page 41: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Staging Area

Display current HEAD commit& Tracked/Untracked files

git status

Page 42: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Staging Area

Add file to Staging Area(index)

git add

Page 43: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Local Repository

git commit

Commit all added changes & save to Local Repository

Page 44: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Git - Remote Repository

git push

Push Local Repository to Remote Repository

HelloGit.txt added to Remote Repository

Page 45: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

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 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

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

8. Add TA to Collaborator of your repository(AhnYounGeun)

It’s double dash - -

See ‘Setting’ tab

Page 47: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

Exercise 2

8. Add TA to Collaborator of your repository(AhnYounGeun)

Page 48: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

+ 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 49: Lab 1: Trello & Git · HelloGit.txt added to Remote Repository. Basic Work Flow 1. git init 2. git remote add [repoName] [url] 3. git pull [repoName] [branch(e.g. master)] 4.

+ 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.)