作業繳交方式
歡迎來到 https://hackmd.io/@nssh/nscsc 共筆
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
點擊本頁上方的 開始用 Markdown 一起寫筆記!
手機版請點選上方 按鈕展開列表。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
HackMD 使用教學
Nan Shan Computer Science Club
講在前面
由於 GitHub 持續在改版使用者介面,實際操作畫面可能與下方擷圖有些出入。
如果操作時有任何不清楚的地方,請向同學、講師尋求協助。
修改紀錄
2021.10.11
更新步驟 6.2,並新增講在前面、修改紀錄段落
2020.04.05
建立此文件
1. Fork 作業 Repo
將原始作業的 Repository(簡稱 Repo)Fork 到你自己的帳戶。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
2. 安裝 GitKraken
GitKraken 是個免費的 Git 圖形化介面程式,最新版本需要 Windows 8 以上的執行環境。
安裝與註冊步驟請參考以下影片,感謝 Progress Bar 進度條線上課程。
請使用 GitHub 登入。(Mac 版教學影片在此)
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
3. 將你的作業 Repo Clone 下來
3.1 進入 Clone a Repo 畫面
在 GitKraken 新分頁畫面點擊左側「Clone a repo」按鈕。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
3.2 選擇來源與目的地
進入 Clone 畫面後,選擇「GitHub.com」來源,並依序在右側選擇:
- 你想要存放於本機的位置
- 哪個 repo 要被 clone 到本機(例如在第 1 步時你 fork 的 repo)
- 該 repo 在本機的目錄名稱(預設值就是 repo 名稱)
- 按下 Clone the repo
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
3.3 開啟 repo
成功將專案 clone 到本機後,就會顯示成功訊息,按下「Open Now」開啟 repo。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
4. 將作業加入到目錄中
4.1 進入目錄
開啟檔案總管,找到你在第 3.2 步存放 repo 的本機位置,然後進入。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
4.2 建立自己的學號目錄
為了與其他同學的檔案分開,請建立自己的學號目錄
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
4.3 將作業檔案加到學號目錄中
把你這次要交的作業加到剛剛建立的學號目錄中
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5 使用 GitKraken 上傳作業
5.1 選取尚未提交的變更
回到 GitKraken,會發現 Git 已經偵測到你在 repo 中的變更,首先點選尚未提交的變更
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5.2 選取欲提交的內容
右側會顯示目錄與 Git 最新紀錄相比的差異檔案,將你這次要更新的內容從 Unstaged Files 區移動到 Staged File 區。
怎麼移動?可個別點選檔案旁的「Stage File」按鈕。或是如果你想要全部移動,就直接按右上角的「Stage all changes」按鈕。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5.3 提交變更
選取完要提交的內容後,輸入這次變更的內容為何,然後按下「Commit changes」按鈕
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5.4 Push 到 GitHub
接著你會看到剛剛提交的變更。此時本機的版本會比 GitHub 上的版本新,請按上方的 Push 按鈕。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
5.5 完成 Push
Push 成功後,會看到你的 GitHub 大頭貼與本機圖示皆位於同一個 Commit 上。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
6 到 GitHub 建立 Pull Request
6.1 到你 Fork 出來的 Repo 確認內容
確認是剛剛 push 的最新內容
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
6.2 點選 Contribute 中的 Open pull request
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
6.3 建立 Pull Request
請確認兩件事:
- 提交的 pull request 目標是原始作業 repo
- 提交的作業檔案包含在你的學號目錄下
都確認以後,按下中間的「Create Pull Request」。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
6.4 說明 Pull Request 內容
此處的標題會顯示在 Pull Request 列表中,因此 請遵循以下格式:
- 標題:請寫上「班級座號 學號 姓名 作業內容」
- 內容:請附上可以執行你的程式的 Repl 連結,若有需補充事項也可以放在此處。
完成後,請按下「Create pull request」按鈕。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
7. 完成
若你看到像這樣的頁面,就是完成了!
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
點選上方 Pull Requests 頁籤,看看你剛剛建立的 Pull Request 有沒有在裡面。
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →