Use IntelliJ IDEA to load the source code in the Gitee warehouse locally and run it, and then use Git to update the modified content to the Gitee remote warehouse

1. Preparation and tools

① There is Gitee and the local project has been uploaded to the managed warehouse

②The IntelliJ IDEA development tool has been downloaded, installed, configured and working normally

2. The operation steps of grabbing the project in Gitee to the local IDEA development tool

  1. Download and install the Gitee plugin in IntelliJ IDEA:

  1. The interface after opening Settings is shown in the figure, we need to enter Gitee in the search bar and press Enter:

  1. There will be a warning during the installation, just click Agree:

  1. After the installation is successful, you need to restart the IDEA tool, as shown in the figure:

  1. At this point, the Gitee plug-in in our local IDEA development tool has been downloaded and installed. Next, we need to go to the Gitee official website to find the warehouse address where our source code is located, as shown in the figure:

  1. At this time, go back to the IDEA tool and click the option as shown in the figure:

  1. After opening this option, the interface as shown in the figure, fill in your user name and password for verification:

  1. The interface after the verification is passed is as shown in the figure. At this time, all the projects under your account will be displayed. Select the project you want to import and click Clone to connect:

  1. Wait for the fetch to complete:

  1. After the capture is complete, there will be a prompt:

Because of the Maven management project I use here, I am prompted whether to open the pom.xml file, which stores the dependent library, that is, whether you want to load the dependent jar packages configured by pom.xml. We choose Yes .

  1. At this time, after the capture is completed, the source code in the warehouse has been successfully dumped into the local IDEA development tool:

At this point, we have completed the work of grabbing the project from Gitee to the local IDEA tool.

3. Local related configuration and project operation

  1. Download the jar dependencies managed by Maven, and click the refresh button to the left of the red 2 to refresh after completion.

  1. After downloading the dependencies, we directly execute the DemoApplication.java file :

Explanation: There will be some differences at the beginning of this step. The moderator uses the Spring framework, so running DemoApplication.java directly on the configured framework will automatically create a program entry hosted by Spring Boot.

如果是使用Tomcat等中间件的需要额外配置相关中间件才能运行。

  1. 使用Google Chrome浏览器访问连接地址:127.0.0.1:8080即可访问到项目主页。

四、本地项目更改内容后将更改后的内容更新到Gitee仓库中

  1. 本地更新后的文件颜色会改变

  1. 将修改过的文件提交到Gitee指定的文件中:

  1. 将修改的文件上传到Gitee仓库中:

打开后的界面如下:

也可以使用下面的这个提交并上传选项:

  1. 继续提交:

说明:这里会因为类当中的一些警告或错误导致出现警告提醒。

  1. 执行继续提交以后会提示你已经提交成功:

  1. 正在上传更新后的文件到Gitee仓库中:

  1. 显示提交成功提示:

  1. 继续Push

  1. Push

  1. 此时去到Gitee仓库中可以看到相关提示信息:

  1. 在Gitee仓库中展开修改过的文件,可以看到本地更新内容已经更新到仓库:

至此,完成了本地更新后的项目内容提交到仓库中。

文终!

特别说明:

因版主项目框架中所配置的服务器及数据库均为个人在研的其他项目所使用,故不方便源码开放,若有需求的同仁可留言,版主可删除相关私有地址及配置后单发。

若在配置使用的过程中有任何问题可留言,版主有空会回复,若有不当的地方望不吝指出,谢谢!

Guess you like

Origin blog.csdn.net/lishihuijava/article/details/129540161