一定是要git拉下来的项目才可以用git更新
进入想要更新的项目目录中,按住shift右击,点击open Git Bash here进入命令行
项目日志
git log
拉取代码
git pull origin developer
developer不是固定的,看后面结尾分支
将工作区的文件添加到暂存区
git add .
查看文件状态(更改信息)
git status
提交暂存区到本地仓库中
git commit -m "feat:代码内容"
输入个人信息(第一次需要)
git config --global user.email ""
git config --global user.name ""
提交代码
git push origin developer
developer不是固定的,看后面结尾分支
错误:
原因:代码未更新到最新,可以再次git pull一下,也可能是系统问题,可以尝试别的方法git pull
显示所有远程仓库
git remote -v
决定了代码更新到哪个仓库里
git分支
git branch 分支名 //创建
git checkout 分支名 //切换