step1:終端cd 進(jìn)入本地項目目錄
step2:git init
step3:git add .
step4:git commit -m "xxxxx" ? 至此git本地倉庫創(chuàng)建完畢
step5:ssh -keygen -t rsa -C "xxxxx@xxxx.com" ?
step6:登錄github帳號帕膜,進(jìn)入setting弯囊,選擇SSH and GPG keys玄括,復(fù)制剛才生成的id_rsa.pub文件內(nèi)容到內(nèi)容框中
step7:在github上為你的項目創(chuàng)建profile吕漂,并且復(fù)制生成的網(wǎng)址
step7:cd 進(jìn)入本地項目目錄
step8:git remote add origin https://github.com/xxxx/xxxxx.git(剛才復(fù)制的網(wǎng)址)
step9:git push -u origin master ? ?至此提交遠(yuǎn)程倉庫結(jié)束钱慢。1分鐘后可以在Github 上看到自己提交的代碼