feat: 更新 readme.md
This commit is contained in:
parent
2d508d047e
commit
5e09c6c3d1
130
README.md
130
README.md
|
|
@ -1,4 +1,4 @@
|
||||||
# Upload Old Project
|
# Tutorial_Git-UploadOldProject
|
||||||
|
|
||||||
此專案示範如何將手邊上傳至 Gitea
|
此專案示範如何將手邊上傳至 Gitea
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
3. 登打儲存庫資料
|
3. 登打儲存庫資料
|
||||||
|
|
||||||
填寫儲存庫名稱(專案名稱),擁有者須為 `OAD-WebTeam` ,瀏覽權限設定為 `Private 私有`,相關資料填妥後建立儲存庫。
|
填寫儲存庫名稱(專案名稱),擁有者須為 `OAD-WebTeam(組織)` ,瀏覽權限設定為 `Private 私有`,相關資料填妥後建立儲存庫。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
@ -58,7 +58,69 @@
|
||||||
|
|
||||||
### 上傳 Source Code
|
### 上傳 Source Code
|
||||||
|
|
||||||
專案將依照 [GitFlow](https://gitbook.tw/chapters/gitflow/why-need-git-flow) 原則進行版控,操作方式以 [使用 command line git 指令操作](#使用-command-line-git-指令操作) 或 [使用 SourceTree 介面操作](#使用-sourcetree-介面操作) 兩種方式擇一即可。
|
專案將依照 [GitFlow](https://gitbook.tw/chapters/gitflow/why-need-git-flow) 原則進行版控,操作方式以 [使用 SourceTree 介面操作](#使用-sourcetree-介面操作) 或 [使用 command line git 指令操作](#使用-command-line-git-指令操作) 兩種方式擇一即可。
|
||||||
|
|
||||||
|
#### 使用 SourceTree 介面操作
|
||||||
|
|
||||||
|
1. 開啟 `SourceTree` ,至 `Create` 頁籤,填入程式相關路徑及專案名稱後,新增即可。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
若有跳出提示表示資料夾已存在,點擊 Yes 繼續即可。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
執行完成後會產生 `.git` folder
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
2. 新增 Remote:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
3. 設定 Remote 資訊,Remote name 勾選 `Default remote` ,登打 Gitea Repository 路徑及登入帳號。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
4. 設定 statged files
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
5. 登打 commit message
|
||||||
|
|
||||||
|
在文字框內登打 `Initial commit` 後,點擊 `commit` 按鈕。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
6. 切換至左方 `BRANCHS` 底下 `master` 分支,我們會看到剛剛增加的 commit,並點擊該項目可於下方查看異動項目清單。這時我們點擊右上角 `Git-flow` 按鈕設定未來上版規則。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
7. 使用預設即可,按 OK。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
8. 完成建立 Git-flow 規則
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
9. 這時我們可以注意到 `BRANCHES` 有兩個分別為 **develop** 及 **master**,但 `REMOTES` 的 origin 並無任何 Branch,我們接著按 Push 至 Remote。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
10. 因 Remote 未建立 **develop** 及 **master** Branch,故我們要將這兩個 Branch 從 Local 發布至 Remote,選擇 `Select All` 後點擊 `Push`。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
11. 完成後我們會看到 Git Graph 上同時會出現 Remote 與 Local 的 Branch,在左側 REMOTES 也出現剛上傳的 Branch。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
#### 使用 command line git 指令操作
|
#### 使用 command line git 指令操作
|
||||||
|
|
||||||
|
|
@ -127,68 +189,6 @@
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### 使用 SourceTree 介面操作
|
|
||||||
|
|
||||||
1. 開啟 `SourceTree` ,至 `Create` 頁籤,填入程式相關路徑及專案名稱後,新增即可。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
若有跳出提示表示資料夾已存在,點擊 Yes 繼續即可。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
執行完成後會產生 `.git` folder
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
2. 新增 Remote:
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
3. 設定 Remote 資訊,Remote name 勾選 `Default remote` ,登打 Gitea Repository 路徑及登入帳號。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
4. 設定 statged files
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
5. 登打 commit message
|
|
||||||
|
|
||||||
在文字框內登打 `Initial commit` 後,點擊 `commit` 按鈕。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
6. 切換至左方 `BRANCHS` 底下 `master` 分支,我們會看到剛剛增加的 commit,並點擊該項目可於下方查看異動項目清單。這時我們點擊右上角 `Git-flow` 按鈕設定未來上版規則。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
7. 使用預設即可,按 OK。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
8. 完成建立 Git-flow 規則
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
9. 這時我們可以注意到 `BRANCHES` 有兩個分別為 **develop** 及 **master**,但 `REMOTES` 的 origin 並無任何 Branch,我們接著按 Push 至 Remote。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
10. 因 Remote 未建立 **develop** 及 **master** Branch,故我們要將這兩個 Branch 從 Local 發布至 Remote,選擇 `Select All` 後點擊 `Push`。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
11. 完成後我們會看到 Git Graph 上同時會出現 Remote 與 Local 的 Branch,在左側 REMOTES 也出現剛上傳的 Branch。
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### Gitea 驗證是否上傳成功
|
### Gitea 驗證是否上傳成功
|
||||||
|
|
||||||
- Repository
|
- Repository
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user