$ git config --global user.name "Your Name" $ git config --global user.email "email@example.com"
初始化版本库
git init
将所有文件添加到暂存区,在git bash下执行
git add .
提交到本地仓库
git commit -m “提交注释说明”
新建远程仓库
将本地仓库与远程仓库建立关联
在git bash界面下输入
git remote add origin url
推送更新
将本地代码推送到远程仓库
git push -u 仓库名字 master