初始化用户(--global表示设置为全局配置):
git config [--global] user.name "Vince"
git config [--global] user.email "[email protected]"
初始化仓库: git init
clone远程仓库: git clone https://github.com/......
设置origin指向: git remote add origin https://github.com/......
删除origin指向: git remote remove origin
git设置自动保存密码: echo -e "\n[credential]\n\thelper = store" >> .git/config
git查看remote地址: git remote -v
git 添加文件到版本控制: git add “文件或文件夹路径”
git提交更新到本地仓库(-a表示全部文件,comment是备注): git commit [-a] -m "comment"
扫描二维码关注公众号,回复:
4588383 查看本文章
git 第一次提交到远程仓库:git push --set-upstream origin master
git提交到远程仓库: git push
git拉取更新: git pull
git查看仓库状态: git status
git查看历史: git log