Can't add master branch [message #1786741] |
Thu, 10 May 2018 08:57  |
Eclipse User |
|
|
|
My master branch doesn't exist. I existed in a previous project, but after I deleted that project (so I could switch my master branch to a new project) it can't be found.
When creating a new remote, I use "origin" as my remote name.
Next, I configure the push for the remote 'origin' using the new repository URL I've created in my GitHub account.
Under Ref mappings, it says "No Push Refspec, will push currently checked out branch instead."
I click "Advanced" for the Push Ref Specifications.
The dropdown menu for Source ref only has HEAD, no master.
When I go back to try and add to Ref mappings, I add "refs/heads/master" to the Local branch and Remote branch field.
Then I go back to Advanced, where it says "refs/heads/master is not a valid ref in local repository"
Please help!!
|
|
|
Re: Can't add master branch [message #1786748 is a reply to message #1786741] |
Thu, 10 May 2018 10:45  |
Eclipse User |
|
|
|
Projects don't have branches but git repositories have them eventually.
From your description I don't know what you did and what your git repository contains.
You can have a completely empty repository without any branches, that's perfectly ok but not really useful.
Open the git repositories view, if you can see your repository there then check which branches it has.
If you miss any local brach you can simply create it ? If you miss any remote tracking branch try to
fetch from your upstream repository, usually you run fetch from upstream for that.
If your repository exists on disk but you don't see it in repositories view you can click the button "Add an existing local git repository to this view" otherwise you can clone it from your git server or start from scratch and create a fresh new repository locally by using the respective buttons in the git repositories view.
|
|
|
Powered by
FUDForum. Page generated in 0.05698 seconds