1. Introduction
This article will introduce how to use the new version IntelliJ IDEA 2020.1
to GitHub
download the private project on the website to the local, and test the submitted code GitHub
, and explain the problems that may be encountered.
What is a private project?
A private project is a project that only you and your designated developers can browse or develop. Others without permission cannot browse or know that this project exists in your personal repository. The public project is the project that all GitHub
people who visit the website can browse and download.
GitHub
Before being acquired by Microsoft, private projects were charged, and you had to pay to use this feature. But now, we can use private projects for free. You can write your own project code, or you may not have complete code for the time being, and you can make it public when it matures. Therefore, the project private or public can be set in the project's settings interface, which is very convenient.
2. Use to IDEA
download private projects to the local
IntelliJ IDEA
The version in this article is IntelliJ IDEA 2020.1 x64
. The new version IDEA
supports one-click download Git
, you don't have to download it yourself Git
, if you already Git
have , then configure it in the settings, and configure the Git
download directory by the way.
1. Open IDEA
the git plugin in
2. Copy the GitHub
project address IDEA
toGit
Log in to your GitHub
, copy the address of the private repository.
Paste the copied address into the URL
text box and follow the instructions below to set the path.
Notice:
- If it is just installed for the
IDEA
first timeDirectory
, it will be prompted to download at the bottom of the above pictureGit
, we can click download. Directory
Set the path, be sure to create a new folder, becauseIDEA
itGit
will not automatically create a folder for you, it is recommended to use the project name as the folder name.Directory
When setting the path, if you select a folder, it must be an empty folder, otherwise itGit
will prompt that it is not empty and it is not allowed to download to the local.
3. IDEA
Login inGitHub
After clicking clone
, IDEA
you will be prompted to log in GitHub
, enter GitHub
the account number and password, click Log In
and log in. It is best to tick Remember
it, and you will not need to log in again next time.
4. Successfully downloaded and opened the project
GitHub
After entering the correct user name and password, you will be prompted to open the project in the current window or a new window (as shown below). If the password is not entered correctly, IDEA
there will be a prompt in the lower right corner, try this step again.
5. Modify the project code and test whether the code can be uploaded to GitHub
We open a file at random, add a line of comment, and then submit it to test whether it can be successfully submitted GitHub
.
IDEA
The code analyzer will prompt that the code has warnings, we ignore first, select all Commit and Push
, and then select Push
.
Refresh GitHub
the page and find that the code is successfully submitted.
Notice:
When submitting the code, IDEA
if an error is reported: , at this time, it may be that there is a problem with the user name entered in the column -author 'xxx' is not 'Name ' and matches no existing author
when you submit the code . Author
You can try to use the following format, input yourname <yourname @qq.com>
, replace the name and email with your GitHub
account, try it yourself, even if you don't use GitHub
the account, you can just enter an author's name.
Summarize:
This article introduces the use of IDEA
downloading and using GitHub
private repositories. The latest version IDEA
and the latest version have GitHub
indeed made some changes, but it is indeed more and more convenient for everyone to use. If you like this article, don't forget to like and subscribe.