当前位置:网站首页>HEAD detached from origin/...导致push失败
HEAD detached from origin/...导致push失败
2022-07-27 03:33:00 【小白目】
提交代码的时候,git add、commit、push一套走完发现没有朴实成功,然后查看状态:

发现出现游离(detached)匿名分支,没有分支名在vs code左下角看是显示一串hash值。
解决办法:
1. 本地新建分支 git branch temp ,让那个匿名分支的代码自动到该新建分支(temp),然后 git add . 到暂存区,git commit -m '提交' 到本地库
2. 切换到要push的目的分支 dev, git checkout dev
3. 从新建分支temp合到目的分支dev,git merge temp
4. 查看下代码修改情况 git status
5. 拉取远端代码并处理冲突 git pull
6. 推到远端
边栏推荐
- Brightcove任命Dan Freund为首席营收官
- 标准C语言13
- Want to get the Apache official domain name mailbox? Exclusive interview with Apache linkis five new committers to tell you how to do it
- Redis database, which can be understood by zero foundation Xiaobai, is easy to learn and use!
- 从根到叶的二进制数之和
- 记一次TCP丢包带来的重大性能问题
- Restful fast request 2022.2.2 release, supporting batch export of documents
- Nacos启动与登录
- Leetcode daily exercise: sort sentences
- Subject 3: Jinan Zhangqiu line 2
猜你喜欢

大咖说·图书分享|精益产品开发:原则、方法与实施

JMeter interface test (login, registration)

Summer meal | rich people are different from what you think (day 5) + power system power flow simulation (documents and matlab code)

11. Zuul routing gateway

什么是动画效果?什么是过渡效果?

Detailed analysis of trajectory generation tool in psins toolbox

list模拟实现

Subject 3: Jinan Zhangqiu line 5

Cool Lehman VR panorama paves the way for you to start a business
![Article main content extraction software [based on NLP technology]](/img/1c/7c1b0e9bc9af62308f4124104f6110.png)
Article main content extraction software [based on NLP technology]
随机推荐
Abstract intelligent extraction [based on Bert technology]
C how to set different text watermarks for each page of word
Subject 3: Jinan Zhangqiu line 5
webpack打包vue项目添加混淆方式,解决缓存问题
Rust:axum learning notes (1) Hello World
每日一题:从链表中删去总和值为零的连续节点
Analysis of three common kinematic models of mobile chassis
SkyWalking分布式系统应用程序性能监控工具-中
【小样本分割】MSANet: Multi-Similarity and Attention Guidance for Boosting Few-Shot Segmentation
Delete the whole line of Excel, and delete the pictures together
ArrayList与LinkedList区别
Golang sends email to the mail Library
Nacos启动与登录
Redis面试题(2022)
JVM原理简介
Knowledge atlas: knowledge representation
php+swoole
通信协议综述
微服务化解决文库下载业务问题实践
2022 operation of simulated examination question bank and simulated examination platform for safety production management personnel of hazardous chemical production units