1. Why use Gitee instead of GitHub?

Many friends may ask this question. The reasons are as follows:

  1. Gitee is a domestic brand with all content in Chinese, which is more friendly to friends with weaker English skills.
  2. Gitee is free for both private and public projects, while GitHub charges for private repositories.
  3. The following image shows a comparison between Gitee and GitHub:

2. How to upload your project to Gitee?

  1. First, register an account on the official website: http://git.oschina.net/

  1. After registration, log in and create your project.

  1. Fill in the project details.

  1. Copy the project URL.

  1. Create a local project (I use Intellij IDEA here).

Create a random file.

  1. Open Git Bash (first install Git from the official website: https://git-scm.com/downloads).

  1. Switch to your project directory.

  1. Clone the Gitee project to your local machine.

The cloning is successful.

  1. Open the cloned project, cut all files, and paste them into the root directory of your local project.

Execute ls and refresh to see the project has been initialized.

  1. Add all files to version control:
    git add .

Then commit the changes:

    git commit -m "This is a test"

Push to Gitee:

    git push origin master

  1. Visit Gitee to confirm your project has been uploaded.

  1. You’re done!
Xiaoye