Git 筆記 - 將本地專案推送至別的儲存庫同步


Aug 28, 2021

因為公司的 gitlab 沒有對外,但又不想將電腦背來背去的,所以使用了其他服務來同步,這樣就可以在公司回家前先將東西 push 到同步用的 repository,之後在家處理完後,最後只需要在公司從同步用的 repository 整個 pull 回來就好了。


在公司的專案內先設定同步用的 repository

$ git remote add <remote_name> <repository.git>

push 至同步用的 repository

$ git push <remote_name>

(在家中只需要正常的對同步用的 repository 做變動就好了)

最後在公司 pull 回來

$ git pull <remote_name> <remote_branch>
#Git







你可能感興趣的文章

#01 Go 語言 環境變數 

#01 Go 語言 環境變數 

[ 紀錄 ] 實戰練習 - 部落格 (以 Express 實作前端 + 後端)

[ 紀錄 ] 實戰練習 - 部落格 (以 Express 實作前端 + 後端)

DAY5:Delete occurrences of an element if it occurs more than n times

DAY5:Delete occurrences of an element if it occurs more than n times






留言討論





2
2
2