2017-02-25 46 views
0

我无法推送到远程存储库。SAP Web IDE不显示远程分支

我跟着步骤中列出Using Source Control Guide

我可以做没有任何错误取回。

当我做一拉,我得到以下信息:
Pull request failed Could not get advertised Ref for branch refs/heads/master

当我做了承诺,我得到以下信息:
Commit request failed Commit failed. Ref must be HEAD and is HEAD

当我尝试推,我不能看到任何远程分支。

我相信我的登录用户名和密码git是正确的。

在3月份的更新中,他们添加了“在Git中创建远程分支”功能。

https://help.hana.ondemand.com/webide/frameset.htm?98fd3efb757d4e39b25740d2f3c83b61.html

+0

您的远程存储库上有master分支吗? –

+0

是不是当我推动时自动创建? http://stackoverflow.com/questions/1519006/how-do-you-create-a-remote-git-branch – Jun

+0

它的确如此。在WebIDE的情况下,当分支不存在于远程时​​,我也遇到了问题。所以我在远程创建了一个分支然后它工作了 –

回答

2

,如果你没有在你的远程仓库主分支你可能会得到一个错误拉。你不能从一个不存在的分支中拉出来。

如果分支不存在于远端,WebIDE将不会显示远端。所以你将无法推动。您应该先在远程&上创建一个分支,然后尝试推/拉。

你可以用git客户端(如git-scm)&在本地执行此操作,然后将分支推送到远程。创建一个项目文件夹&在您的终端/命令提示符下导航到它。添加一些文件,可能是一个Readme.md &运行下面的命令。

git init //Initialize the repository 
git add -A //Add all files to the staging area 
git commit -m "Initial Commit" //Commit all changes 
git remote add origin https://github.com/YouUser/SampleApp.git //Add your remote 
git push origin master  //Push the branch 'master' to the remote repository 

现在添加在WebIDE &它应在遥控器中显示的遥控器。

0

试试这个配置来解决该问题。

git config --unset branch.master.remote 
git config --unset branch.master.merge 

如果这是行不通的验证主分支没有在远程服务器上删除(错误)

要验证是否有当地的分支机构跟踪使用此。

# display the remote tracking branches of your local branches 
gir branch -a -v 

enter image description here