Friday, 31 August 2018

Pushing an eclipse project to github for the first time

If you have an existing eclipse project that you want to push to an existing newly created repo on github, these are the steps:

1) Go to the eclipse project folder path in cmd prompt
2) git init
3) git add .
4) git commit -m "First Commit"
5) git remote add origin https://github.com/shamsa-abid/MyUPMiner.git
6) git pull origin master --allow-unrelated-histories(optional step)
7) git push -u origin master

However, it is recommended that you first create the repo on Github, clone it to a folder and create your eclipse project in that folder.

Solution for error: fatal: refusing to merge unrelated histories is step no. 6

No comments:

Post a Comment

what is a good PhD contribution?

When PhD candidates embark on their thesis journey, the first thing they will likely learn is that their research must be a “significant ori...