# 任務19 為自己發一個PR 1. 到mentor-program-2nd 把網址clone下來 ![](https://i.imgur.com/B5PJAnV.png) 2. 開啟 使用git clone 網址 ``` git clone git@github.com:CodeShibaGo/mentor-program-2nd.git ``` 3. 創建一個專案資料夾 ``` mentor-program-2nd ``` 4. 進去那個創的專案資料夾 ``` cd mentor-program-2nd ``` 5. 在iterm 創建一個branch ``` git branch Chrislinlin_mission_19 ``` 6. 切換到這個branch ``` git checkout Chrislinlin_mission_19 ``` 7. 開啟vscode ``` code . ``` 8. 在資料夾創自己的名字以及創建一個index.html ![](https://i.imgur.com/ifRZqcU.png) 9. 把創建的index.html push上去 10. 回到mentor-program-2nd,點選pull&request ![](https://i.imgur.com/N8NTWdp.png) 11. New pull request ![](https://i.imgur.com/CydSBqU.png) 12. 點進去 create pull request,可以選自己的branch,就可以create ![](https://i.imgur.com/ocKHNhr.png) # new way ## part 1 1. 在my-projects裡的 xx_mission這個branch已經`git push完畢`。 2. 切換到gh-pages,應該裡面啥都沒有, merge branch剛剛已push好的mission ![](https://i.imgur.com/3NNDYha.png) 0. gh-pages merge xx_mission (branch) 1. if 在my-projects裡專案已完成,xx_mission branch - [x] 在my-projects發pr - [x] gh-pages已push有靜態網頁 - [x] hackmd筆記已寫好 2. iterm 進入 mentor-program 資料夾/ chrislinlin 裡(main branch) 3. 用vscode 打開來 4. 在vscode 創建mission_xx 資料夾,裡面創造mission_xx.md mission_xx.md 內容 ![](https://i.imgur.com/8PVBaR6.png) ==做完到步驟四都是`main`branch== 5. 在main branch,輸入下列指令,創造mission_xx branch ``` git checkout -b mission_xx ``` 6. git add / commit / push 7. 回到mentor-program_2頁面,發個pr ![](https://i.imgur.com/phDCWwP.png) ###### tags: `git`