1. 程式人生 > >如何用命令將本地項目上傳到git和ssh配置

如何用命令將本地項目上傳到git和ssh配置

pub 上傳 posit comm pos pull 地址 rem 關聯

嘛,就是將服務器上的網站和本地同步。
首先是上傳服務器上的網站到github倉庫
git init
git add .
git commit -m ‘‘
關聯遠程倉庫,先去github上新建一個,new repository
git remote add origin 你的遠程庫地址
同步 合並
git pull --rebase origin master
推送
git push -u origin master
克隆
git clone [email protected]:jaxma/pig.git pig

ssh的問題
查看有沒有id_dsa.pub

cd ~/.ssh

沒有的話

ssh-keygen -t rsa -C "[email protected]"

比如我的

[email protected]:jaxma

cat ~/.ssh/id_rsa.pub

復制公鑰

到SSH and GPG keys裏添加

如何用命令將本地項目上傳到git和ssh配置