git 在 GitKraken 中推送失败并显示错误消息“推送失败无法读取未定义的属性‘fullName’”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/42694584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:51:47  来源:igfitidea点击:

Push fails in GitKraken with errormessage "Push Failed cannot read property 'fullName' of undefined"

gitgithubpull-requestgitkraken

提问by Steve Waters

I was trying to push and create a pull-request from my local feature-branch, as usual, being in my feature-branch and right-clicking on the remote origin/develop -branch (I'm using Git Flow), and this error message popped out:

我试图从我的本地功能分支推送并创建一个拉取请求,像往常一样,在我的功能分支中并右键单击远程源/开发分支(我正在使用 Git Flow),这弹出错误信息:

enter image description here

在此处输入图片说明

Can't find anything with that error message. Any ideas?

找不到带有该错误消息的任何内容。有任何想法吗?

回答by notedible

I had this problem as well when there was a HEAD tag at a commit behind the current local master or origin/master.

当在当前本地 master 或 origin/master 后面的提交中有一个 HEAD 标记时,我也遇到了这个问题。

Try double-clicking your local master (which eliminates HEAD) and then push your changes.

尝试双击您的本地母版(消除 HEAD),然后推送您的更改。

Note that if you do not have a local master, right-click on remote origin master and choose 'Checkout origin/master'. Then pull, commit, push your changes.

请注意,如果您没有本地 master,请右键单击 remote origin master 并选择“Checkout origin/master”。然后拉取,提交,推送您的更改。

回答by gfyans

Going to add my tuppence here. I had a casing mismatch on a folder between a local branch and the remote.

要在这里添加我的 tuppence。我在本地分支和远程分支之间的文件夹上有大小写不匹配。

Make sure when you create a branch that the case matches remote i.e. if your remote folder is called Task, don't create a local branch called task\1234-my-task.

确保当你创建一个与远程匹配的分支时,即如果你的远程文件夹被称为Task,不要创建一个名为 的本地分支task\1234-my-task

回答by Nate Ritter

The fix by @notedible didn't work for me. But it led me to simply going to the command line and doing a git status

@notedible 的修复对我不起作用。但它让我简单地进入命令行并执行git status

$ git status
On branch feature/RES-523
Your branch and 'origin/feature/RES-523' have diverged,
and have 13 and 2 different commits each, respectively.
  (use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean

$ git pull
From https://bitbucket.org/my-repo
 * [new branch]        feature/RES-523 -> origin/feature/RES-523
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Already up-to-date.

Boom! Good to go.

繁荣!很高兴去。

回答by Richie Wynne

I had the same problem. My branch name had an apostrophe in it (Richie'sVersion). I created a new branch from the existing branch (essentially a copy of the existing branch) and gave it a name without an apostrophe (RichiesVersion) and this resolved the problem. Pushing the new branch worked fine.

我有同样的问题。我的分支名称中有一个撇号(Richie'sVersion)。我从现有分支(基本上是现有分支的副本)创建了一个新分支,并给它起了一个没有撇号的名称(RichiesVersion),这解决了问题。推动新分支工作正常。

回答by Me3nTaL

You just have to temporarily rename your branch the error appears, then push and then again rename the branch.

您只需要临时重命名出现错误的分支,然后推送,然后再次重命名分支。

e.g.: branch feature/coolBranch -> feature/tmpcoolbranch (push here) -> feature/coolBranch

例如:分支功能/coolBranch -> 功能/tmpcoolbranch(推这里)-> 功能/coolBranch

That's it.

就是这样。

回答by William Smith

I know this answer may not be the most popular, but I ran into this problem today and none of the above solutions worked. I finally got fed up with the GUI and after committing my changes I switched to CLI and pushed the branch from there. Git handled it without any issues. No disrespect to GitKraken- I upgraded to a Pro license because its a good tool.

我知道这个答案可能不是最受欢迎的,但我今天遇到了这个问题,而且上述解决方案都没有奏效。我终于厌倦了 GUI,在提交更改后,我切换到 CLI 并从那里推送分支。Git 处理它没有任何问题。没有不尊重 GitKraken - 我升级到 Pro 许可证,因为它是一个很好的工具。

回答by Brilldav

This happens to me when we have branches that are mixed case and using GitKraken. If I rename to consistent casing, it works fine. In my case the GIT remote repository had, unintentionally, two branch folders one with mixed case and one with lowercase. My GitKraken matched the mixed case, but since the lower case existed, I got this error.

当我们有大小写混合的分支并使用 GitKraken 时,就会发生这种情况。如果我重命名为一致的大小写,它工作正常。在我的例子中,GIT 远程存储库无意间有两个分支文件夹,一个大小写混合,一个小写。我的 GitKraken 匹配混合大小写,但由于存在小写,我收到此错误。

The resolution was to clean up the remote branch name so there was no ambiguity to the remote names, then the GitKraken error was resolved.

解决方案是清理远程分支名称,使远程名称没有歧义,然后解决了 GitKraken 错误。

https://support.gitkraken.com/known-issues/common-errors/#error-when-pushing-a-branch

https://support.gitkraken.com/known-issues/common-errors/#error-when-pushing-a-branch