git仓库新建上传记录

新建git仓会出现版本分支问题,解决过程:

其他的前期绑定之类的传送:https://blog.csdn.net/qq_37194189/article/details/130767397


大概思路:新建一个分支,上传,合并,删除分支

git branch 查询分支状态(*代表的是当前你所在的工作分支)

git status 查询检查是否成功状态

创建一个分支:newbran

复制代码
git branch newbran

检查分支状态

复制代码
git branch

切换新分支

复制代码
git checkout newbran

一系列上传

复制代码
git add . 
git commit -m '1'

查看状态:git status

On branch newbran

nothing to commit, working tree clean

再切回去原分支

复制代码
git checkout master

将新分支提交的改动合并原分支上

复制代码
git merge newbran

提交

复制代码
git push -u origin master

删除新分支

复制代码
branch -D newbran

就搞定了,以后老三样就可以了

复制代码
git add .
git commit -m "1"
git push
相关推荐
誰能久伴不乏9 小时前
看懂 Git 团队协作全流程:分支、提交、PR、rebase 到底在干嘛
git
sunshine22 girl14 小时前
git tag-项目流程
git
imDwAaY1 天前
6篇文章讲清楚Git:Git 远程协作:fetch、pull、push 到底有什么区别?(3/6)
git·后端
imDwAaY1 天前
6篇文章讲清楚Git:Git 撤销与恢复:reset、revert、restore 应该怎么选?(4/6)
git
用户73309646123091 天前
再也不怕手滑丢代码!给 git 高危操作加一层安全校验
git
广白1 天前
Git Tag 实战:从出包追溯到版本发布
前端·git·面试
Winlifes7 天前
我给 Codex 做了一个 Git 面板:分支树、提交历史和工作区操作
git
郑州光合科技余经理7 天前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
我命由我123457 天前
Git 推送报错:error: src refspec main does not match any
运维·git·gitee·github·运维开发·学习方法·版本控制
Lcr3s8 天前
Git基础之(0):如何在Ubuntu(Linux)上安装git
git