How to Push/upload NetBeans Project to GitHub

11
0. Login to your GitHub account, create a new repository and copy the repository link.

0.1. Open NetBeans IDE and create or open a new project.

1. Right click on project-> Versioning-> Initialize Git Repository-> OK.

2. Write commit:
     a. Right click on project-> Git-> Commit->
     b. Write commit message in box,
     c. Select checkbox below of your project directories and files you want to push
          (don't select git files which name contains 'ignore' words e.g. gitignore) and
           then click Commit.

3. Pull Repository from GitHub and Merge:
    a. Right click on project-> Git-> Remote-> Pull->
    b. Enter Git Repository Link in the Repository URL field,
    c. Enter Username and Password and click Next.
    d. Select Remote Branches "master -> origin/master [ ]" and click Finish,
    e. A dialogue will appear, click on Merge.

4. Push to GitHub:
    a. Right click on project-> Git-> Remote-> Push->
    b. You'll see Configured Git Repository Location is selected, if not then select and click Next.
    c. Select Local Branches "master -> master [ ]" and click Next.
    d. Select Remote Branches "master -> origin/master [ ]" and click Finish.

5. Go to your GitHub Repository and check the project has been pushed.


N.B. you can try directly push like below skipping pull (step-3), but sometimes this way shows error.

Direct Push to GitHub after doing commit:
    a. Right click on project-> Git-> Remote-> Push->
    b. Enter Git Repository Link in the Repository URL field,
    c. Enter Username and Password and click Next.
    d. Select "master -> master [ ]" and click Next,
    e. Select "master -> origin/master [ ]" and click Finish.


Post a Comment

11Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
  1. I followed these steps but after pushing my project, my github doesn't contain any java files I have in my project. What should be the reason behind that?

    ReplyDelete
    Replies
    1. If you folllow these steps correctly, files should be uploaded. And Java files not uploaded, that means folders uploaded but there is no java file or nothing uploaded?

      Delete
    2. i did all of steps but when i push my project i get error-->git:Error writing request body to server

      Delete
  2. I very much enjoyed this article. Nice article thanks for given this information. I hope it useful to many People
    Core Java Training
    J2EE Training in Chennai
    Angular Training in Chennai

    ReplyDelete
  3. Other useful links containing screenshots , video tutorials and step by step guide : https://mauricemutetingundi.wordpress.com/2019/01/08/how-to-upload-push-add-netbeans-java-php-project-to-github/, https://mauricemutetingundi.blogspot.com/2019/01/how-to-uploadpushadd-netbeans-java.html , https://www.youtube.com/watch?v=xqGg1nW5xU0

    ReplyDelete
  4. Thanks For sharing a nice post about datascience with python Training Course.It is very helpful and datascience with python useful for us.datascience with python training in bangalore

    ReplyDelete
  5. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a .Net developer learn from Dot Net Training in Chennai. or learn thru ASP.NET Essential Training Online . Nowadays Dot Net has tons of job opportunities on various vertical industry.DataScience with Python Training in Bangalore

    ReplyDelete
Post a Comment