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 “you@example.com”
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 “123456789@qq.com” 配置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