github初次下載和提交代碼

github 下載和提交代碼

初次使用github提交代碼到github服務器
1:下載代碼
cd ~/DevelopDir
git clone https://github.com/hku-mars/loam_livox.git

2: 一系列修改代碼的操作

3:使用 git add . 添加修改到暫存區

4:使用 git commit -m “first time modifiy” 出錯

*** Please tell me who you are.
Run
git config --global user.email “[email protected]
git config --global user.name “Your Name”
to set your account’s default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got ‘cpf@cpf.(none)’)

5:執行 git config --global user.email “[email protected]” 配置email

6:再次執行 git commit -m “first time modifiy”

7:更新遠程最新代碼到本地:
git pull https://github.com/hku-mars/loam_livox master

8:提交到遠程服務器
git push https://github.com/hku-mars/loam_livox master
輸入賬號和密碼後即可提交

Git windows客戶端全局設置

用戶名設置:git config --global user.name name
密碼設置:git config --global user.password password
查看配置:git config --list

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章