初始化仓库
添加
- git add . //将所有文件提交到缓存库,如果只提交单个文件的话把.换成文件名
- git commit -m"添加备注"
- git remote add origin 仓库链接
- git push origin master
放弃本地修改,强制更新
- git fetch --all
- git reset --hard origin/master
从远程仓库拉取代码
配置用户名和邮箱
- $ git config --global user.name "Your Name"
- $ git config --global user.email "email@example.com"