Git上傳專案到Github教程
阿新 • • 發佈:2019-01-06
本文的操作環境是Ubuntu16.04lts。
第一步:安裝的Git
第二步:控制檯生成公鑰:
ssh-keygen -t rsa -C "[email protected]"
一直回車也行,然後將id_rsa.pub複製到github上
第三步:設定使用者名稱和郵箱,控制檯操作
git config user.name"you name"
git config user.email"[email protected]"
第四步:進入你的專案,初始化為倉庫,然後.......上傳(例)
cd ~/helloworld
git init
git add *
git commit -m 'frist commit'
#git remote add test [email protected]:你的github使用者名稱/github上的倉庫名.git
git remote add test [email protected]:kkkk/hello.git
git push -u test master
#這一步可能會出錯,出錯後執行下邊一行
git push -f