In this post you are going to learn how to upload a NetBeans project to GitHub. This project can be in any language Java or python or any other programming language that you can use in NetBeans IDE.

Requirements

  • A github account
  • A project opened in Netbeans IDE
  • An active internet connection

Procedure

Create a Repository on github

1. Login to GitHub.com and click on the plus (+) icon in the top bar. Then select "New Repository" from the drop down menu.

2. Name the repository and write a description for it in the respective fields and click on "Create Repository"

3. The repository is created successfully. You need to copy the https url of the repository because you will need it later.

Upload the project to the Repository

1. Right click your project, Select "Versioning" and then select "Initialize git Repository". Click "Ok" in the prompt that appears.

2.  Right Click the project, Select "Git" and then select "Commit".

3. Select "Commit" in the next Window and then click "Yes" in the next prompt.

 4. Right Click the Project, Select "Git" then "Remote" and then "Push"

5. Paste the URL that you copied in the step 3 of creating a repository into the Repository URL box shown by red in the screenshot below. Also enter your GitHub and username and password in the boxes shown by green in the screenshot below. Then click "Next". In the next window that appears, select the master branch  and click "Next". Then click "Finish".

 6. Select "Yes" in the next prompt and your project will be uploaded to GitHub in a few seconds.

7. You can check your project on GitHub by refreshing the repository page on GitHub.


Quick Summary

  • Create a repository on GitHub and get the git URL
  • Right Click the project / Versioning / Initialize Git Repository
  • Right Click the project / git / commit // commit / Yes
  • Right Click the project / git / remote / push
  • Enter github repository URL, Github username and password
  • Next / Select master / Next / Finish / Yes
  • The Project is uploaded successfully

Video

Following is a video demonstrating all these steps. Watch the video and make sure to subscribe me on YouTube.