I am creating a totally new OSS project for my organisation and I want to host it on GitHub. The project will be developed using Eclipse and I am using EGit. I have no prior experience with Git, as I've previously only used SVN.
Here's what I did so far:
- Created a new account for my organisation on GitHub. (I already had a personal account.)
- Created a new repository under my organisation's GitHub account for this project.
- Under the new repository's "Collaborators" section, added my personal account. (I verified this in my personal account.)
- Installed EGit into my Eclipse. (I am using Eclipse 4.2 with EGit 2.0.0)
- Created a new Eclipse project in a new Eclipse workspace. (It's a Maven project so I created it through m2e but that shouldn't make a difference.)
- Added the new Eclipse project to a new Git local repository (via Team -> Share Project).
- Created the .gitignore (ignores Eclipse-specific files and directories).
- Added source to the project (via Team -> Add to Index).
- Committed local changes to my local repository.
- Copied the HTTPS URL from GitHub.
- Team -> Remote -> Push
- The URL from the clipboard was already taken and most fields populated.
- Entered username and password for my GitHub personal account, clicked Next, data was fetched successfully.
- Selected "refs/head/master" from the Source ref dropdown (I didn't understand this entire page, maybe I've put something wrong?)
- Clicked "Add Spec" and then Next
At this point, I got the error "master: master [rejected - non-fast-forward]"
I searched on Google, but the suggested resolution was to do a Pull. I tried "Team -> Pull", but got the error "The current branch is not configured for pull; No value for key branch.master.merge found in configuration"
Can anyone help me? My remote repo is still empty (save for the .gitignore and the README.md). I want to get files from my local into that remote repo!!