0% found this document useful (0 votes)
46 views

T019 GitHub 2020

This document provides instructions for a GitHub tutorial presented in June 2020. It discusses registering for a GitHub account, setting account settings like email, creating and managing repositories, and using GitHub features like Actions and Packages. The tutorial covers introductory topics for using GitHub to host and collaborate on code projects.

Uploaded by

Chen Mars
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

T019 GitHub 2020

This document provides instructions for a GitHub tutorial presented in June 2020. It discusses registering for a GitHub account, setting account settings like email, creating and managing repositories, and using GitHub features like Actions and Packages. The tutorial covers introductory topics for using GitHub to host and collaborate on code projects.

Uploaded by

Chen Mars
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

T019_GitHub_2020

Tutorial 019 講義: GitHub 簡介(2020 June)


CourseGUID: a8d42393-bd7e-46d7-9889-9a413d2c136a
=============================================================
==========
T019_GitHub_2020
T019_01_GitHubPrice (1. to 2.)
T019_02_RegisterGitHub (3.)
T019_03_ChangeGitHubEmail (4.1. to 4.2.)
T019_04_CreateGitHubRepository (5.1.)
T019_05_AboutGitHubRepositoryClone (5.2.)
T019_06_DeleteGitHubRepository (5.3.)
----------------------
Tutorial 019 講義: GitHub 簡介(2020 June)
Tutorial 019-01: 關於 GitHub Price (1. to 2.)
Tutorial 019-02: 註冊 GitHub (3.)
Tutorial 019-03: 修改 GitHub 帳號的 Email (4.1. to 4.2.)
Tutorial 019-04: 建立 GitHub 的 Repository (5.1.)
Tutorial 019-05: 關於 GitHub 的 Repository 的 Clone 資訊 (5.2.)
Tutorial 019-06: 刪除 GitHub 的 Repository (5.3.)
=============================================================
==========
1. Introduction
1.1. Pre-Requirement
1.2. Software that you might need
-----------
2. GitHub Price
3. Register GitHub
-----------
4. GitHub Settings
4.1. GitHub change Email
4.2. GitHub Email Privacy
-----------
5. GitHub GitHub
5.1. GitHub Create Repo
5.2. GitHub Repo, Git Clone Information
5.3. GitHub Delete Repo
=============================================================
==========
 
 

1. Introduction 
 

1.1. Pre‐Requirement 
 

T000_018_GitForWindows_2020 

Tutorial 018: Git for Windows 下載與安裝(2020 April) 

1.2. Software that you might need 
 

Step 1 

Install Git 

You need Git environment for your computer 

‐‐‐‐‐‐‐‐‐‐‐‐ 

安裝 Git 

你需要設定你電腦的 Git 環境 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Step 2: 

Register a Git server 

Git server is a place which store your source code. 

‐‐‐‐‐‐‐‐‐‐‐‐ 

註冊 Git server 

Git server 就是你存放 source code 的地方 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Step 3: 

Install graphical user interface (GUI) 

Some people might not be familiar with Git command. 

In this case, they may use some kind of GUI for Git 

GUI allow users to click some buttons,  

then GUI will execute the correspond Git command. 

‐‐‐‐‐‐‐‐‐‐‐‐ 

安裝可支援 Git 的圖形介面 (GUI) 


有些人可能對 Git command 不太熟悉 

所以 他們可以使用 可支援 Git 的圖形介面軟體 (GUI) 

GUI 允許使用者只需要按下幾個按鈕 

然後 GUI 就會執行相對應的 Git command 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Step 4: 

Install GUI/Visual Merge Tool 

When your team member and you are changing the same files,  

you might have to merge 2 changes of the same files from 2 different people. 

It is always hard to do merge,  

so GUI/Visual Merge Tool might help you compare the different of 2 changes 

then make you easier to do Merge. 

‐‐‐‐‐‐‐‐‐‐‐‐ 

安裝 Merge 的圖形介面工具軟體 

當你的 team member 和你一起修改相同檔案時 

你可能會需要 Merge 兩人的修改部分 

Merge 其實是很難的 

所以  Merge 的圖形介面工具軟體 可以幫助你 比較兩人的修改部分 

讓你更容易執行 Merge 

‐‐> 

Here, we are going to do Step 2 

2. GitHub Price 
 

This is the price that I saw in May 2020. 
 

Go to  

https://github.com/pricing#feature‐comparison 

 
 

1. 

GitHub Actions 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

1.1. 

Reference: 

A. 

GitHub Actions: How to Set Up a Simple Workflow 

https://youtu.be/F3wZTDmHCFA 

B. 

Github Actions 初探 

https://juejin.im/post/5c417da751882525c63809cd 

C. 

About GitHub Actions 

https://help.github.com/en/actions/getting‐started‐with‐github‐actions/about‐github‐
actions 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

1.2.  
In Brief, You may write some custom tasks, called GitHub Actions, 

to help you automatically set up in your repository  

to build, test, package, release, or deploy any code project on GitHub. 

‐‐‐‐‐‐ 

簡單來說, 你可以寫一些客製化的 tasks (稱之為 GitHub Actions) 

幫助你自動化你的 repository 的設定 

(舉例來說, 當你 merge 你的 side branch 到 main branch 的時候) 

會自動幫你的 repository 做 build, test, package 的動作 

甚至 你還可以設定自動 release, or deploy 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

2. 

GitHub Packages storage 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

2.1. 

Reference: 

About GitHub Packages 

https://help.github.com/en/packages/publishing‐and‐managing‐packages/about‐github‐
packages 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

2.2. 

A "package" is kind of a self‐contained and reusable piece of codes  

such as common framework for developing a project. 

You can publish some GitHub packages  

in a public repository (public packages)  

to share with all of GitHub,  

or in a private repository (private packages)  

to share with collaborators or an organization. 

GitHub Packages usage is free for public packages.  

For private packages,  

each GitHub account receives a certain amount of  

free storage and data transfer. 
The storage is GitHub Packages storage  

which is like the size limit of your GitHub Packages. 

‐‐‐‐‐‐ 

package 是一種類似於 self‐contained (自給自足)  

並且 reusable (可重複使用的) 的 一段程式碼 

例如, 可以用於開發的 common framework (可給多個 project 共用的 framework) 

你自己寫的 package 放在 GitHub 上面, 稱之為 GitHub package 

你可以 發行一些 公開的 GitHub package 給所有 GitHub 用戶使用 

你也可以發行一些  私人的 GitHub package 給 你的同事和公司使用 

公開的 GitHub package 並沒有 

針對 Storage ( package 所占用的空間大小 ) 做限制 

但是 

私人的 GitHub package 是有 Storage 的限制的 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

3. 

For most project, the free account will be good enough. 

You may pay additional fee if you want to get additional GitHub feature. 

‐‐‐‐‐‐ 

對大部分的情況來說 

免費帳號已經很夠用了 

但是如果你覺得免費的不夠用 

你還是可以交錢購買更多的功能 

3. Register GitHub 
 

Go to  
https://github.com/ 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Click "Sign Up" 

It will go to  

https://github.com/join?source=header‐home 

‐‐> 

Fill up your username, email and your password 

‐‐> 

Click "Verify" 

Ensure you follow the instruction to complete the verify process 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

按下"Sign Up" 

會跑到 

https://github.com/join?source=header‐home 

填入你的 username, email 和 password 

按下"Verify" 

你要確實的完成 Verify 才行 

 
 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

 
 
If you didn't complete your verify process,  

then you have to do it again. 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

如果你沒有完成 verify 

那他會讓你重新做一次 

 
 

If you can complete your verify process in time 

Just click "Create Account" to  

‐‐‐‐‐‐‐‐‐‐‐‐‐ 
如果你完成了一定時間內完成了 verify 

就可以按下 Create Account 了 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Github will provide a short survey, please complete it. 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Github 會讓你做一個簡短的問卷 

 
 
 

 
 

 
 
 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

 
GitHub will request you to verify your email,  

In this case, you have to check your email  

and follow the instruction to verify your email. 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

GitHub 會寄給你一個驗證 email 

請你去收一下 email 

然後按下 email 內的連結就可以完成驗證 

 
 

In your email, Click "Verify email address". 

It will go to  

https://github.com/join/get‐started 

 
 
 

https://github.com/join/get‐started 

 
 

4. GitHub Settings 
 
4.1. GitHub change Email 
 

Go to  

https://github.com/ 

On top right, click your picture,  

‐‐> Settings 

‐‐‐‐‐‐‐‐‐‐ 

如果你想要換你帳號的 email 

就去 https://github.com/ 

在右上角你的照片那邊 

選取 

Settings 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Click "Emails" tab 

‐‐> 

If you want to change your GitHub email... 

‐‐> 

Firstly, you have to enter your new email  

in  "add email address" and then click "Add" 
‐‐> 

Go to "Primary Email Address" and  

set your new email as your Primary email address. 

‐‐> 

On top area 

Delete your old email. 

‐‐‐‐‐‐‐‐‐‐ 

左邊選取 Email tab 

如果你想要換你帳號的 email 

首先 

你需要新增你新的 email 在 

"add email address" 

接著 

去"Primary Email Address" 

將你的新的 email 設為 Primary 

然後在最上方 

刪除你舊的 email 

 
 

 
 
 

‐‐> 

If you changed your email 

Please ensure your new email will get the "Notifications" 

‐‐‐‐‐‐‐‐‐‐ 

當你改變你的 email 

記得也要去"Notifications" 

改變你接收"Notifications" 的 email 

 
 
 

4.2. GitHub Email Privacy 
 

 
 
1. 

By default,  

It will select the  

Keep my email addresses private 

and 

un‐select 

Block command line pushes that expose my email 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

預設情況下 

會勾選 

Keep my email addresses private 

但不會勾選 

Block command line pushes that expose my email 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

2. 

Keep my email addresses private 
When you perform "Merge and Edit", GitHub will not display your email 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

當你在做 "Merge 和 Edit" 的時候 


GitHub 不會顯示你的 email 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

3. 

Block command line pushes that expose my email 

When you commit to Git,  

the commit will record your email. 

In this case,  

GitHub will display your email. 

If you select this option,  

GitHub will prevent you to commit by your private email 

in order to hide your private email. 

Some people will use other email to commit in order to hide their private email. 

In my case,  

I don't mind to show my email when commit. 

Thus, I un‐select this option. 

‐‐‐‐‐‐‐‐‐‐‐‐‐ 

當你 commit 到 Git 的時候 

Git 會記錄你的 email 

這種情況下 

GitHub 是會顯示出你的 email 

如果你勾選了此選項 

GitHub 會阻止你使用此私人 email 來做 commit 的動作 

這樣就可以隱藏住你私人 email 

有些人會使用其他 email 來 commit 

這樣就可以隱藏住私人 email 

以我的情況來說 

我其實不介意在 commit 的時候顯示我的 email 


(因為這樣才能證明是我做的) 

所以我會 "不勾選"此選項 

5. GitHub GitHub 
 

5.1. GitHub Create Repo 
 

Your Photo ‐‐> Right Click  

‐‐>  

Your Repositories 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

你的照片  

按下右鍵 

選取 

"Your Repositories" 

 
 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

New 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

按下"New" 

 
 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Repository name :  

gitdemo 

‐‐> 

Description (optional) : 

a git demo 用來練習使用 GitHub 

‐‐> 

public 

‐‐> 

Select 

Initialize this repository with a README 

‐‐> 

Add .gitignore: 

VisualStudio 

‐‐> 

Add a license: 

MIT License  

‐‐> 

Create Repository 

 
‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

It will go to the following page 

https://github.com/gitithandyguytw/gitdemo 

 
 
 

5.2. GitHub Repo, Git Clone Information 
 

1. 

Go to  

https://github.com/ 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

先去 

https://github.com/ 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

2. 

Your Photo ‐‐> Right Click  

‐‐>  

Your Repositories 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

你的照片  
按下右鍵 

選取 

"Your Repositories" 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Select  

"gitdemo" 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

選取 

"gitdemo" 
 

 
 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

Press "Clone or download" 

Copy the HTTPS URL 

This is for Git Clone 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

按下 "Clone or download" 

並且複製 

HTTPS URL 

這些資料是為了 Git Clone 

 
 

5.3. GitHub Delete Repo 
 

If you want to delete your Repository 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

如果你想要 Delete 你的 Repository 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

In your repo page 

‐‐> 

Go to Setting Tab 

‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

在你的 Repo 頁面 

點選"Settings" 

 
 

scroll down 

You will see the "delete this repository" button 

Here you may delete your repo 

I just want to show you how to delete the repo. 

Please don't delete now 

‐‐‐‐‐‐‐‐ 

往下拉 

你將會看到"delete this repository"按鈕 
這邊你可以刪除 repo 

我只是想讓你知道如何刪除 repo 

但是請你先不要刪除 repo 

 
 

 
 
 
 

You might also like