ha9u63a7
ha9u63a7

Reputation: 6824

Issues with adding a new Java project to a Github location

I have been having issues with adding a Java project to my git area. I have tried the following commands in steps:

git init # To my Eclipse Java project folder
git remote set-url origin https://github.com/manmedia/MyProjectFolder.git
git commit -a -m "Initial commit"
git push -u origin master

I have viewed similar questions on StackOverflow and tried to apply the solutions suggested, but nothing worked. I am constant getting the following error message:

remote: Repository not found
fatal: repository 'https://github.com/manmedia/MyProjectFolder.git' not found.

I am fairly new to Git and trying to understand this beast (very inconvenient compared to SVN and CVS, I must say). Do I actually need to be on Github.com to create the repository and then fork it out or can I do it directly from my Windows command prompt?

Upvotes: 0

Views: 33

Answers (1)

VonC
VonC

Reputation: 1324043

Do I actually need to be on Github.com to create the repository

Yes, you need to create an empty Git repo on GitHuhb first.

and then fork it out

No fork or clone needed then. The rest of your commands executed locally should work.

I would just add your GitHub login in the url:

git remote set-url origin https://<yourLogin>@github.com/manmedia/MyProjectFolder.git

Make sure you did first (at least before the first commit) a:

git config --global user.name <yourLogin>
git config --global user.email <yourEmail>

Upvotes: 1

Related Questions