## clone別人的專案或自己的專案 ```bash git clone <url> ``` 例如: ```bash git clone https://github.com/帳號/專案名.git ``` --- ## Fork 原作者的資料到自己的 GitHub 倉庫 ### 1. Fork原作者的專案到自己 GitHub ```bash git clone <我的倉庫 URL> ``` ### 2. 更新本地端的內容,然後推送回自己的倉庫 ```bash git add . (.=全部) git add 檔案名稱.副檔名 (單一個檔案加入暫存) git commit -m "更新內容" git push ``` ### 3. 回到自己網站上GitHub,建立 Pull Request --- ## 與原作者保持同步 ### 1. 查看遠端數據庫 ```bash git remote -v ``` ### 2. 為新增原作者的遠端數據庫 ```bash git remote add 自己取變數名 <原作者倉庫 URL> ``` ### 3. 取得原作者最新更新的內容 ```bash git fetch 自己取的變數名 ``` ### 4. 合併原作者的最新內容 ```bash git merge 自己取的變數名/main ``` > **這步驟可以選擇執行與否:** > 若要讓 GitHub 上 Fork 過來的專案也同步到最新版本,請執行: ```bash git push origin main ``` ---