After checking Upload my project to github I still have no idea how to get a project uploaded to my Git Hub repository.
I\'m new to GitHub and I have no idea what to
It took me like 2 hours to realize that I'm supposed to create Repo to GitHub (http://github.com/new) before trying to push my local files to github.
After trying to push errors were like:
remote: Repository not found.
fatal: repository 'https://github.com/username/project.git/' not found
I feel like an idiot, but I really would like to emphasize this. I just thought that my repo will be created automatically during the first push. I was so wrong.
$ git init$ git add .$ git commit -m "First commit"$ git remote add origin remote repository URL$ git push origin masterSteps to upload project to git:-
step1-open cmd and change current working directory to your project location.
step2-Initialize your project directory as a Git repository.
$ git init
step3-Add files in your local repository.
$ add .
step4-Commit the files that you've staged in your local repository.
$ git commit -m "First commit"
step5-Copy the remote repository url.
step6-add the remote repository url as origin in your local location.
$ git add origin copied_remote_repository_url
step7-confirm your origin is updated ot not.
$ git remote show origin
step8-push the changed to your github repository
$ git push origin master.
I think the easiest thing for you to do would be to install the git plugin for eclipse, works more or less the same as eclipse CVS and SVN plugins:
http://www.eclipse.org/egit/
GL!
The best way to git is to actually start Gitting. Try out this website which makes you go step by step on what are the essential ways for performing functions on command line for pushing a Project on GitHub
This is called try.github.io or you could also take up a course on codeAcademy
Make sure that git is installed on your system. I'm explaining the process using windows OS
Here is how I did :
1.Open the cmd (you can do with git bash as well).
2.Go to your project directory(where your project is located).
3.Now type your_directory >git init this will initialize an empty repository if it is first time and enter.
for eg :C:\Users>git init
4.Now type your_directory >git add <filename>(if specific files) or git add . (if you want to add all files) and enter.
5.Now type >git commit -m "commit message goes here" and enter.
(in case if you need to check the status you can do by typing >git status) and enter.
6.Now type >git remote add origin git_repository_url
(check>git remote -v) and enter.
7.Now turn to push it ...>git push origin master and enter
(if you get error you push it forcefully by typing ...>git push -f origin master and enter.
Now you're done with adding it to your repository. Refresh it and it will be there in your created repository.
Hopefully, this will work for you.