# 作業繳交方式 {%hackmd fssTA9u7QDCSoJc5aAGcUQ %} ## 講在前面 由於 GitHub 持續在改版使用者介面,實際操作畫面可能與下方擷圖有些出入。 如果操作時有任何不清楚的地方,請向同學、講師尋求協助。 ## 修改紀錄 * `2021.10.11` 更新步驟 6.2,並新增講在前面、修改紀錄段落 * `2020.04.05` 建立此文件 ## 1. Fork 作業 Repo 將原始作業的 Repository(簡稱 Repo)Fork 到你自己的帳戶。  --- ## 2. 安裝 GitKraken [GitKraken](https://www.gitkraken.com/) 是個免費的 Git 圖形化介面程式,最新版本需要 Windows 8 以上的執行環境。 安裝與註冊步驟請參考以下影片,感謝 Progress Bar 進度條線上課程。 **請使用 GitHub 登入**。([Mac 版教學影片在此](https://www.youtube.com/watch?v=PhuJXWaObmA)) {%youtube JirpN16MBOI %} --- ## 3. 將你的作業 Repo Clone 下來 ### 3.1 進入 Clone a Repo 畫面 在 GitKraken 新分頁畫面點擊左側「Clone a repo」按鈕。  ### 3.2 選擇來源與目的地 進入 Clone 畫面後,選擇「GitHub.com」來源,並依序在右側選擇: 1. 你想要存放於本機的位置 2. 哪個 repo 要被 clone 到本機(例如在第 1 步時你 fork 的 repo) 3. 該 repo 在本機的目錄名稱(預設值就是 repo 名稱) 4. 按下 Clone the repo  ### 3.3 開啟 repo 成功將專案 clone 到本機後,就會顯示成功訊息,按下「Open Now」開啟 repo。  --- ## 4. 將作業加入到目錄中 ### 4.1 進入目錄 開啟檔案總管,找到你在第 3.2 步存放 repo 的本機位置,然後進入。  ### 4.2 建立自己的學號目錄 為了與其他同學的檔案分開,請建立自己的學號目錄  ### 4.3 將作業檔案加到學號目錄中 把你這次要交的作業加到剛剛建立的學號目錄中  --- ## 5 使用 GitKraken 上傳作業 ### 5.1 選取尚未提交的變更 回到 GitKraken,會發現 Git 已經偵測到你在 repo 中的變更,首先點選尚未提交的變更  ### 5.2 選取欲提交的內容 右側會顯示目錄與 Git 最新紀錄相比的差異檔案,將你這次要更新的內容從 Unstaged Files 區移動到 Staged File 區。 怎麼移動?可個別點選檔案旁的「Stage File」按鈕。或是如果你想要全部移動,就直接按右上角的「Stage all changes」按鈕。  ### 5.3 提交變更 選取完要提交的內容後,輸入這次變更的內容為何,然後按下「Commit changes」按鈕  ### 5.4 Push 到 GitHub 接著你會看到剛剛提交的變更。此時本機的版本會比 GitHub 上的版本新,請按上方的 Push 按鈕。  ### 5.5 完成 Push Push 成功後,會看到你的 GitHub 大頭貼與本機圖示皆位於同一個 Commit 上。  --- ## 6 到 GitHub 建立 Pull Request ### 6.1 到你 Fork 出來的 Repo 確認內容 確認是剛剛 push 的最新內容  ### 6.2 點選 Contribute 中的 Open pull request  ### 6.3 建立 Pull Request 請確認兩件事: 1. 提交的 pull request 目標是原始作業 repo 2. 提交的作業檔案包含在你的學號目錄下 都確認以後,按下中間的「**Create Pull Request**」。  ### 6.4 說明 Pull Request 內容 此處的標題會顯示在 Pull Request 列表中,因此 ==請遵循以下格式==: 1. 標題:請寫上「**班級座號 學號 姓名 作業內容**」 2. 內容:請附上可以執行你的程式的 **Repl 連結**,若有需補充事項也可以放在此處。 完成後,請按下「Create pull request」按鈕。  --- ## 7. 完成 若你看到像這樣的頁面,就是完成了!  點選上方 Pull Requests 頁籤,看看你剛剛建立的 Pull Request 有沒有在裡面。 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up