git checkout 报错 refname 'origin/branch-name' is ambiguous

When this happened, it created the file .git/refs/heads/origin/branch-name. So, I just deleted the file。

执行 rm .git/refs/heads/origin/分支名

再checkout

git checkout 报错 refname 'origin/branch-name' is ambiguous

原文地址:https://www.cnblogs.com/cheng6018/p/8474536.html

时间: 2024-07-30 14:28:35

git checkout 报错 refname 'origin/branch-name' is ambiguous的相关文章

git checkout 报错error: Your local changes to the following files would be overwritten by checkout: data/dev.php Please, commit your changes or stash them before you can switch branches.

1  git clean n //这个是清除文件预览 git clean -f //强制清除文件 2  git clean -f //强制清除文件 3  git checkout -f <branch>  //不建议使用  容易丢失文件 原文地址:https://www.cnblogs.com/vinzen/p/9651876.html

Git报错:Your branch is ahead of &#39;origin/master&#39; by 1 commit

.    commit之后,用git status,打印信息为: # On branch master # Your branch is ahead of 'origin/master' by 1 commit. # nothing to commit (working directory clean) 说明没有文件需要commit,但是本地仓库 有一个commit ahead原来的master,就是本地仓库有一个提交,比远程仓库要先进一个commit. You get that message

git push 报错:failed to push some refs to &#39;[email&#160;protected]:devops/thor.git&#39;

error: failed to push some refs to '[email protected]:devops/thor.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Integrate the remote changes (e.g. hint: 'git pull ...') before pushing

&lt;问题解决02&gt;Linux虚拟机使用git push报错--解决方案如下:

问题描述: 使用git push 报错: error: The requested URL returned error: 403 Forbidden while accessing https://github.com/Newlyfly/Hello_World.git/info/refs fatal: HTTP request failed 解决方案: 解决方案来源博客地址:http://blog.csdn.net/happyteafriends/article/details/1155404

git push报错error: failed to push some refs to &#39;[email&#160;protected]:

$ git push -u origin master To [email protected]:xxx/xxx.git ! [rejected] master -> master (fetch first) error: failed to push some refs to '[email protected]:xxx/xxx.git' hint: Updates were rejected because the remote contains work that you do hint:

git提交报错SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

git push报错 git push origin master [email protected] /e/git/ouyida3/ouyida3.github.io (master) $ git push origin master fatal: unable to access 'https://github.com/ouyida3/ouyida3.github.io.git/': err or:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tl

Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin.

问题:Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin. 原因:.js文件中使用load()方法,而Chrome浏览器出于安全起见,不允许load本地文件. 方法:给Chrome添加启动参数--allow-file-access-from-files. 步骤:右击Chrome浏览器快捷方式,选择“属性”,在“目标”中加上"--allow-file-access-from-files",注意前面有个

解决git pull报错的方法

第1个问题: 解决GIT代码仓库不同步 今天在执行git pull时出现: [[email protected] /data/work/www/rest/lib/Business/Inventory]# git pull Enter passphrase for key '/root/.ssh/id_rsa': Updating 70e8b93..a0f1a6c error: Your local changes to the following files would be overwritt

git bash提交代码过程 以及 git pull报错 your local changes to the following files would be overwritten by merge:

git bash 平常提交代码流程: 1. 在文件根目录下鼠标右键点击空白处,选择git Base here 2. git status 查看哪些文件被修改,文件状态为 modified, 也就是被修改了,“Changes not stagged for commit”表示文件被修改但是提交前还没有被存储 3. git add 将修改添加到暂存区(git commit之前必须要执行这一步) git add . : 是将所有被修改的文件和新增加的文件,但不包括被删除的文件 添加到缓存区 git a