git异常:fatal: 'idea-line-2' is not a commit and a branch 'idea-line-2' cannot be created from it

简介: git异常:fatal: 'idea-line-2' is not a commit and a branch 'idea-line-2' cannot be created from it

创建分支并且拉去远程同步分支的过程中出现该异常:


fatal: 'idea-line-02' is not a commit and a branch 'idea-line                                                              -02' cannot be created from it
复制代码


这个时候其实是因为没有将当前分支的代码和远程代码进行拉去同步导致的。


解决思路:


git pull 拉去远程代码同步,再做切换:


$ git pull
$ git checkout -b idea-line-02 origin/idea-line-02


目录
相关文章
|
5月前
|
开发工具 git C++
【App Service】VS Code直接部署App Service时候遇见 “fatal: not a git repository (or any of the parent directories): .git”
通过VS Code发布Python App Service的时候,遇见了发布失败错误: The deployment failed with error: fatal: not a git repository (or any of the parent directories): .git . Please take a few minutes to help us improve the deployment experience
124 24
|
2月前
|
前端开发 Java 开发工具
Git使用教程-将idea本地Java等文件配置到gitte上【保姆级教程】
本内容详细介绍了使用Git进行版本控制的全过程,涵盖从本地仓库创建到远程仓库配置,以及最终推送代码至远程仓库的步骤。
58 0
|
4月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
329 1
|
4月前
|
Linux 网络安全 开发工具
IDEA如何配置git和github
【11月更文挑战第14天】本指南详细介绍了如何在 IntelliJ IDEA 中配置 Git 和 GitHub,包括检查和设置 Git 路径、测试配置,以及通过 SSH 或 HTTPS 方式配置 GitHub 仓库的具体步骤。完成配置后,用户可在 IDEA 中轻松进行版本控制操作。
649 0
|
6月前
|
开发工具 git
IDEA更改远程git仓库地址
【9月更文挑战第27天】本文介绍了两种在IntelliJ IDEA中更改远程Git仓库地址的方法:一是通过图形界面,在VCS设置中直接修改;二是通过IDEA内置的命令行工具使用`git`命令进行更改。具体步骤包括从版本控制菜单进入项目设置、修改远程仓库URL,以及使用`git remote set-url`命令更新仓库地址,并验证修改结果。这些方法适用于项目迁移或更换仓库地址的情况。
1449 6
|
5月前
|
Java Shell 开发工具
git集成IDEA,托管项目实现版本管理
git集成IDEA,托管项目实现版本管理
57 0
|
6月前
|
Shell 网络安全 开发工具
Git,GitHub,Gitee&IDEA集成Git
Git提交项目到GitHub简洁版、版本控制、安装、常用命令、分支、团队协作机制、Github、Gitee远程仓库、IDEA集成Git、IDEA集成Github、IDEA集成Gitee
|
7月前
|
开发工具 git
Git 中的 fork、branch 和 clone
【8月更文挑战第27天】
363 5
|
6月前
|
Shell 网络安全 开发工具
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
fatal: unable to access 'https://github.com/wolfcw/libfaketime.git/': Encountered end of file
|
7月前
|
开发工具 git
成功解决:fatal: detected dubious ownership in repository at ‘E:/workspace/CSMarket‘。如何使用git工具通过命令行的形式
这篇文章分享了作者在使用Git工具初始化本地仓库时遇到的权限问题,提供了通过命令行解决Git仓库权限问题的方案,并介绍了如何使用Git命令行初始化项目、添加文件、提交以及关联远程仓库的步骤。
成功解决:fatal: detected dubious ownership in repository at ‘E:/workspace/CSMarket‘。如何使用git工具通过命令行的形式