当前位置:网站首页>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. 推到远端
边栏推荐
- 搜索旋转排序数组
- Interview question 02.05. sum of linked list
- MySQL: understand the basic knowledge of MySQL and computer
- Introduction to JVM principle
- 288页18万字智能化校园总体设计 目录
- 法解析的外部符号 “public: virtual __cdecl nvinfer1::YoloLayerPlugin::~YoloLayerPlugin(void)“ “public: virtua
- 细说Hash(哈希)
- Want to get the Apache official domain name mailbox? Exclusive interview with Apache linkis five new committers to tell you how to do it
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- 【LeetCode】Day104-无重叠区间
猜你喜欢

Brightcove任命Dan Freund为首席营收官

三种常见的移动底盘运动学模型分析

2022 operation of simulated examination question bank and simulated examination platform for safety production management personnel of hazardous chemical production units

Rust:axum learning notes (1) Hello World

2022年危险化学品经营单位主要负责人复训题库及答案

记一次TCP丢包带来的重大性能问题

Golang sends email to the mail Library

Practice of microservice in solving Library Download business problems

Delete the whole line of Excel, and delete the pictures together

【MySQL系列】MySQL索引事务
随机推荐
[Code] sword finger offer 04 search in two-dimensional array
Delete the whole line of Excel, and delete the pictures together
leetcode每日一题:数组的相对排序
深度剖析 —— 动态内存管理
ffmpeg合并视频功能
Golang sends email to the mail Library
Interview question 16.05 factorial mantissa
Interview question 02.05. sum of linked list
ISG指数显示,亚太区IT和商业服务市场在第二季度出现大幅下滑
ArrayList与LinkedList区别
什么是动画效果?什么是过渡效果?
First pass of routing strategy
Subject 3: Jinan Zhangqiu line 5
二叉树的坡度
Specified interval inversion in the linked list
2022 retraining question bank and answers for main principals of hazardous chemical business units
288 page 180000 word intelligent campus overall design directory
JS to realize page Jump and parameter acquisition and loading
[small sample segmentation] msanet: multi similarity and attention guidance for boosting few shot segmentation
JMeter interface test (login, registration)