Article directory
1.What is Gitee?
gitee
It is git
a domestic platform based on code hosting and R&D collaboration, where personal or company code and open source projects can be hosted. gitee
URL:https://gitee.com/
2.gitee registration
①Log in gitee
to the website and come to the following interface, click Register in the upper right corner
②Follow the following steps to complete gitee registration
③After registration, the following interface
3. Installation of git tools and graphical interface tools
To conduct code hosting, you need to install the following software .
Among them git-2.33.1-64-bit.exe
is the git command tool, but inputting commands to control gitee is not so friendly to us, so we need to install a TortoiseGit-2.12.0.0-64bit.msi
graphical interface tool based on the git command tool to facilitate our operation!
Step 1:
① Double-click git-2.33.1-64-bit.exe
, keep clicking the next button, and use the C drive path of its default installation (not recommended to change)
③Right-click in the blank space and click "Show more options". When you see Git GUI Here
and Git Bash Here
two options, it means the installation has been successful.
Step 2:
①Double TortoiseGit-2.12.0.0-64bit.msi
-click the installation and keep clicking next
until the final click finish
is completed
. ②The previous ones are default. Name
Enter your user name in , enter Email
your email address in , and finally click Next to complete the installation.
Name
Fill in @
the English name
Email
option and fill in your Gitee
email address. If the "Public email address" option of your email is checked Select, remember to uncheck.
③ When the installation is complete, click "Show more options". When you see the following options, it means the installation has been successful. Note
: You must first install git-2.33.1-64-bit.exe
the git command tool, and then install TortoiseGit-2.12.0.0-64bit.msi
the graphical interface tool.
4.gitee warehouse creation
① Click "New Warehouse"
② Make simple settings for the warehouse
③ After the creation is completed, it will jump to the following interface, indicating that the warehouse has been created and
the warehouse is open source:
① Click "Manage"
②Scroll down, click "Open Source", click "I Commit", and finally click "Save", your warehouse will be "Open Source".
Delete warehouse:
Click the "Management" interface, click "Delete Warehouse", finally enter the content of the prompt, and click the "Confirm Delete" option.
5. Link the local warehouse to the remote gitee warehouse
① In the warehouse interface, click "Clone\Download" and select the "http" URL to copy
② Select a suitable location to store the cloned remote warehouse, right-click in the blank space, and click "Show more options". By default, the just-filled fields will be filled in. To copy the gitee remote URL and local warehouse path, just click "OK".
③ You can see the local warehouse with the same name as the gitee warehouse you just created (that is, the remote warehouse is cloned into the local warehouse). Click on it. When you see the file attached when creating the gitee repository, you can see that .git
the file indicates that the remote repository is connected to the local repository.
Some students cannot see .git
the file because it is a hidden file. Click the "Show" option in "View" and check the "Hidden Items" option.
So how to submit code? We use VS to write code. The steps are as follows:
① When creating a project, select the project storage location 与远端仓库建立联系的本地仓库文件夹
② In the created project, write the following code:
#include<stdio.h>
int main()
{
printf("hello gitee");
return 0;
}
We have written test.c
the code file and stored it in the local repository, so how to submit it to the remote Gitee repository? Then you need to use gitee
the three axes: add
, commit
, push
, let us learn how to use them together!
6.git three-axe
add
① In the blank space, right-click, click "Show more options", click “TortoiseGit"
, add
click "OK", the following interface will appear, because your VS is using the project at this time, and you need to turn off the project in VS. project (or close VS directly), and then restart add
:
add
add the code to the local warehouse
commit
commit
: Submit code to the warehouse
push
push
: Push the addition operation to the remote warehouse
. Note: When pushing for the first time, you need to fill in your username and password, which correspond to the mobile phone number and password you set when you registered.
After using the Sanbanax operation, you can see the code files we pushed in the remote warehouse (remember to refresh below).
7. Frequently asked questions about gitee code submission
Question 1: What should I do if I enter the wrong username and password for the first time?
① Search for "Credential Manager" in the Windows "Start" box, click in
② Select “windows凭据”
, find the one you created today gitee凭据
, expand it and delete the credential.
③ Use Sanbanaxe again. This time, enter the username and password correctly and you can push the code file to the remote warehouse normally.
Question 2: After submitting the code file, is there no green dot in the contribution?
① Check the gitee mailbox of the remote warehouse
② Follow the steps below to check the local mailbox
③If gitee
the warehouse email is inconsistent with the local warehouse email, modify the local warehouse email to be consistent with the gitee email. You will see the little green dot reappear the next time you submit.