列出已配置的倉庫:
git remote
列出已配置的倉庫、並顯示URL
git remote -v
新增一個倉庫並指令名稱和URL
git remote add <remote_name> <remote_url>
範例:git remote add gitlab http://127.0.0.1:8088/tythac/webyserp.git
刪除指定倉庫
git remote remove <remote_name>
初始化倉庫
git Init
上傳並合併(–force)
git push --force <遠機主機名> <本地分支名>
範例:git push gitlab
情境:在原本的專案中已和 GitHub 連結資料、目前另建一個私人 Gitlab 時上傳的方式(手動)
git add 檔案
範例:git add testupdategitlab.js、或是上傳所有更新 git add .
git commit -m "備註"
範例:git commit -m "testupload"
git push 倉庫名 分支名
範例:git push gitlab master