git clone https://xx,
git pull

git status


git commit -m "代码提交内容"

- git push <远程主机名> <远程分支名>:
git push origin master
git push提示failed to push some refs"XXX"
推代码error,出现错误的原因是github中的README.md文件不在本地代码目录中。很明显,这是因为远程库与本地库不一致造成的,
也就是说我们需要先将远程代码库中的任何文件先pull到本地代码库中,才能push新的代码到github代码库中,接下来把远程库同步到本地就可以了
git pull --rebase origin master
- 这条指令的意思是把远程仓库中的更新合并到本地库中,–rebase的作用是取消本地库中commit,并接到新版本库中,之后在 执行上面代码后可以看到本地代码库中多了README.md文件
7.将提交的代码推送到主分支
git push -u origin master