Jun
Jun

Reputation: 3044

SAP Web IDE doesn't show remote branchese

I had trouble pushing to a remote repository.

I followed the steps listed Using Source Control Guide

I could do a fetch without any errors.

When I do a pull, I get the following message:
Pull request failed Could not get advertised Ref for branch refs/heads/master

When I do a commit, I get the following message:
Commit request failed Commit failed. Ref must be HEAD and is HEAD

When I try to push, I cannot see any remote branch.

I am sure that my login user name and password to git are correct.

In their March update, they added "Create Remote Branches in Git" function.

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

Upvotes: 0

Views: 2404

Answers (3)

Jun
Jun

Reputation: 3044

In their March update, they added "Create Remote Branches in Git" function.

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

Upvotes: 1

Stephen S
Stephen S

Reputation: 3994

You may get a pull error if you don't have a master branch on your remote repository. You cannot pull from a branch which does not exist.

WebIDE will not show the remote if the branch does not exist on the remote. So you will not be able to push. You should first create a branch on the remote & then try push/pull.

You can do this locally with a git client(like git-scm) & then push the branch to your remote. Create a project folder & navigate to it in your terminal/command prompt. Add some files maybe a Readme.md & run the commands below.

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

Now add the remote in WebIDE & it should be shown in the remotes.

Upvotes: 2

CodeWizard
CodeWizard

Reputation: 142532

Try this config to fix the issue.

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

If this is not working verify that the master branch was not deleted on the remote server (by mistake)

To verify if you have local branches tracked use this.

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

enter image description here

Upvotes: 0

Related Questions