Author: Spring_ZYL
Feedback: [email protected]
Source: https://www.jianshu.com/u/1b5928185b73
Disclaimer: This article belongs to the author of all, please indicate the source
My IDEA version is 2018.3.4. Different IDEA versions have similar operations. Please refer to the following to start using the Gitee plugin!
Install the Gitee plugin
[File]-[Settings]-[Plugins], check the gitee plugin and install
it. After the installation is complete, restart IDEA
Add a Gitee account
[File]-[Settings]-[Version Control]-[Gitee], click [Add account] to add an account
Enter the account number and password, and click [Log In] The
account information will be displayed after successful login
Project initialization
IDEA project shared to Gitee
Select the project to be synchronized, click the menu [VCS]-[Import into Version Control]-[Share Project on Gitee],
click the [Share] button
Uncheck unnecessary files, click [Add] to prompt the project to be successfully shared to Gitee,
log in to Gitee to see the project
Gitee project cloned to IDEA
[VCS]-[Checkout from Version Control]-[Git]
Enter the URL of the Gitee project, click [Clone] to start cloning
Click [Yes] and
click [This Window] to
clone successfully, you can see the project code
Gitee teamwork
Pull code
[VCS]-[Update Project]
Click [OK] to
indicate how many files to update, you can click [View] to view the updated file list
Update file list
Submit code
Note: Before submitting the code, you should pull it first. If there is a code conflict when pulling, you should resolve the conflict before submitting
[VCS]-[Commit] You
can choose which code to submit, select all by default, enter the submission information, and click [Commit and Push]. Or click [Commit] first, then click [Push] from the menu to
select the default branch, click [Push] to
submit successfully
Code conflict
When submitting or pulling the code, if there is a conflict, the following dialog box will pop up. Select the conflicting file and click [Merge]
. Three boxes appear in the dialog box, which are:
- The left border is the local code to be submitted
- The right border is the code in Gitee
- The middle box is the result code after conflict resolution
Resolve code conflicts: we modify the middle code, and can select [Accept Left] or [Accept Right] according to the situation; or manually modify the conflict code and click [Apply] and
click [Yes]
When all conflict files are resolved, resubmit