Java basic tutorial-share your own project on Git

Java zero-based self-study website, click to understand: https://how2j.cn

Aliyun server, click to learn: https://www.aliyun.com/minisite/goods

Step 1: Share your project on Git

The previous pull project  tutorial was to pull down my project, and then I will demonstrate how to share my project on Git.

Step 2: Create a new warehouse on Git

First log in to github.com,
then click the plus sign on the left side of the account in the download area (click to enter) , and click New repository to create a repository.
Git on the warehouse is equivalent to the meaning of the project

Create a new warehouse on Git

Step 3: Enter the warehouse name

Enter the warehouse name helloworld here.
Note:  Do not select Initialize this repository with a README, otherwise strange problems will come out

Enter the warehouse name

Step 4: Create successfully and get the git address

Created successfully, get the git address

Step 5: Create a java project in Eclipse

Create a java project in Eclipse: helloword, and create a HelloWorld class

Create a java project in Eclipse

package helloworld;

 

public class HelloWorld {

 

    public static void main(String[] args) {

        System.out.println("Hello World");

    }

}

Step 6: Share Project

Right-click the project->Team->Share Project

Share Project

Step 7: configure the warehouse

Configure the repository, click Use or create repository in parent folder of project

Configure warehouse

Step 8: create a warehouse

Step 1: Click on the first red box
Step 2: Click on the second red box
Step 3: Click Finish

Create warehouse

Step 9: Submit the project

Right-click the project->Team->Commit

Submit project

Step 10: Set submission information

Set submission information: test 
click the red box and select all files

Set submission information

Step 11: set git parameters

URI: https://github.com/how2j/helloworld.git
Host: github.com
Respository path: /how2j/helloworld.git It

stands to reason that as long as the address is entered in the URI, the next two parameters will be automatically generated,
then enter the account password and
finally Check Store in Secure Store, which means Eclipse will keep your account password. 

Note:  how2j should be modified to your username

Set git parameters

Step 12: Specify the branch

Use the default branch: master

Designated branch

Step 13: Submit successfully

Submitted successfully

Step 14: icon change

After the submission is successful, a small warehouse icon will appear under the project, folder, package, and class, indicating that it is synchronized  . It is different from the small icons in the step of submitting the project .

Icon change

Step 15: Observe the project on github

Open the address: https://github.com/how2j/helloworld and
you can see the project created on github.
Note  how2j should be changed to your username

Observe the project on github


For more information, click to understand:  https://how2j.cn/k/git/git-create/1343.html

Guess you like

Origin blog.csdn.net/java_zdc/article/details/105848232