I tried to push my code to github (by the Eclipse), and I encountered a problem.
I did the following steps:
- On my project (in Eclipse) : right click > team > share project > click on "git" > next.
In configure git repository dialog:
- Check: use or create repository in parent folder of project
- Click on the line inside the table, this will enable Create Repository button.
- Click Create Repository button.
- Click finish
Connect project to remote repository previously created on Github:
- Copy remote repository URL from github.
- Go to Git perspective in Eclipse:
- On Git Repositories view:
- Go to Remotes section, right click it and choose Create Remote…
- On New Remote dialog click OK
On Configure Push dialog:
- Push URIs section click add
- On Destination Git Repository paste the URL copied from github into URI text field.
- Press Finish.
- Ref mappings section click add.
On Create or Edit Refspec, Remote branch text field: type “refs/heads/master”.
- Check "force update".
- press OK.
In order to push your code to github:
- in Eclipse right click on project name
- choose: Team | Push to upstream
After all that, I got this error:
deletion of the current branch prohibited error: refusing to delete the current branch: refs/heads/master
How can I solve this problem?