How to create a repository on Github with Eclipse? Here's an answer.
I'll teach you and do it step by step. Before creating your own repository in GitHub you need has an active account in GitHub.
Note:you can to go sign up if you haven ' t any Github account.
Here is my own Eclipse version information.
Here we go!!!
1. Create a Java project (e.g Gitwitheclipsedemo for my demo) in your eclipse. and create some classes
2. Right click Project--Team--Share project ...
3. Configure Git Repository window would be displayed. Then click ' Create ' button.
4. Click ' Browser. ' button to select a folder in your PC to set repository directory. This direcory is a local git repository.
In this case, I set my repository directory is ' C:\Users\Administrator\Documents\GitHub ', and click ' Finish ' button.
5.Click ' Finish ' button in the Configure Git Repository window.
6.Go to Window-Show View, other. Then the ' Show View ' window is displayed and to find Git sections. Select ' git repositories ' and ' Git Staging ' and click ' Ok ' button.
7.As Step 6 to select "History" Item under Team section.
8. Right click Project--Team--Commit.
9. Commit changes to Git Repository window would be displayed. Type Commit message and select files, want to commit, and click ' Commit ' button to commit.
In this case, I want to commit all files under ' Gitwitheclipsedemo ' project
10.Go to your own GitHub website and click ' New ' button to create a New repository in GitHub.
Type the Repository name and click ' Create Repository ' button to create a new Repository in Github.
In this case, I created ' Gitwitheclipsedemo ' repository in my Github.
12.Copy the URL of the Github provided.
13.Back to eclipse and find remotes under Git repositories. Right click-Create Remote ...
Type the name for the new remote and click ' Ok ' button
In this case, I used ' demo ' for my remote name.
Configure push for remote ' demo ' window would be displayed. Click the ' Change ' button.
Copy the URL that is provided by Github (Refer Step), and type the user and password (this user and password can login y Our github). Click ' Finish ' button.
Click ' advanced ' button in the Configure Push for remote ' demo ' window.
Select ' master ' for Source ref and click ' Add Spec ' button.
19.A New Mode is added after clicking ' Add Spec ' button in the Step 18.
Find demo in the Remotes section under Git repositories. Right click-Push
21.A Push Results window would be displayed.
22.Go to your GitHub website, your can find your local sources had been pushed in GitHub now.
End. If You do some changes in your project (e.g. change code), you can Commit and Push it into Github.
You can find this 'gitwitheclipsedemo' in my Github.
Thanks for watching.
========================================================
More Reading,and 中文版 is important.
I ' m Hongten
E | [Email protected] B | Http://www.cnblogs.com/hongten
========================================================
How to create a repository on Github with Eclipse?