-
本地仓库初始化
git init
-
添加本地文件到本地仓库
git add .
添加工作区文件到本地仓库
git commit -m “注释内容”
-
本地库关联远程库
git remote add origin https://github.com/***.git
-
查看是否关联成功
git remote -v
-
推送master分支的所有内容
git push -u origin master
-
根据提示 首先需要将远程仓库的代码pull到工作区
git pull https://github.com/***.git master
-
git status查看文件的状态 文件冲突先解决冲突。
之后add + commit提交到本地仓库;再次推送本地仓库master分支的所有内容git push -u origin master