search
HomeDevelopment ToolsgitDetailed analysis of how to build a website on gitee

As a global open source community platform based on Git, by building a website on Gitee, you can make full use of Gitee's functions and resources to better develop and manage your website. So, how to build a website on Gitee? Next, we will answer this question in detail.

1. Register and create a warehouse

First, you need to register an account on Gitee and then log in to the system. After successfully logging in, you can create a new warehouse, which can be used for code hosting or website building.

In the page to create a new warehouse, you can customize the name, select the warehouse type and set public/private and other related options, and click Confirm on the "Create" button. After creating a new warehouse, you can proceed to the next step.

2. Upload your website

After creating the warehouse, you need to upload your website to it. Before uploading, you need to prepare your website codes and save them locally on your computer.

Next, you can use the following two methods to upload your website to Gitee:

1. Use Git command

Use Git to upload your website to Gitee superior. First copy the SSH or HTTPS connection address of Gitee's corresponding warehouse, then open Git Bash or CMD on your local computer, and use Git commands to upload your entire website folder to Gitee.

The specific method is as follows:

$ git clone git@gitee.com:/.git   // 克隆仓库到本地
$ cd                          // 进入仓库目录
$ cp -r  .       // 复制网站文件夹到当前目录
$ git add .                              // 添加文件
$ git commit -m "添加网站"    // 提交网站
$ git push                                 // 推送到Gitee

Note that <user name></user> and <warehouse name></warehouse> require you to Replace the command with your real information.

2. Upload directly

In your warehouse page, there is an Upload file button, you can directly upload the entire website folder.

The specific method is as follows:

1. 点击仓库页面上的“Upload file”按钮
2. 选择需要上传的网站文件夹
3. 点击“Commit changes”按钮提交更改

After uploading your website files, you need to create a file named 'index.html' and copy its content to your homepage .

3. Enable Gitee Pages

After uploading your website and ensuring that the 'index.html' home page has been created, you need to enable Gitee Pages to make your website visible to the public .

The specific steps to enable are as follows:

  1. Enter your warehouse in Gitee
  2. Click the Settings button, and then find "Pages" in the left navigation bar option and open the 'Pages' page.
  3. Select a theme you like in the 'Theme' drop-down menu.
  4. Select the branch where you uploaded the website files in the 'Branch' drop-down menu.
  5. Click the "save" button to save your changes.

4. Preview website

After enabling Gitee Pages, you can see your website on the browser.

The specific method is as follows:

  1. Click the "Settings" button on the warehouse page
  2. Find "Pages" in the left navigation bar and enter the Gitee provided Preview address Preview your website.

5. Custom domain name

You can also display your website through a custom domain name. First, you need to bind the domain name you want to use to the Gitee Pages preview address.

The specific method is as follows:

  1. Enter the domain name management page you purchased, add a CNAME record, and point your domain name to Gitee's Pages preview address.

For example, if your preview address is .gitee.io/<warehouse name></warehouse>, then you add a CNAME in the domain name management interface Record, add the following content:

项目    记录类型    主机记录    记录值
CNAME    www        @            .gitee.io/
  1. Return to your Gitee warehouse page, click the "Settings" button to enter the "Pages" page.
  2. Enter your own domain name in the "Custom domain name" box.
  3. Click the "Save" button to save your changes.

Okay, the above is the detailed process of building a website on Gitee. Hope it helps you build your own website.

The above is the detailed content of Detailed analysis of how to build a website on gitee. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Git and GitHub: Exploring Their Roles and FunctionsGit and GitHub: Exploring Their Roles and FunctionsMay 09, 2025 am 12:25 AM

The role and function of Git and GitHub in software development is to manage code and collaborative development. Git efficiently manages code versions through commit, branch and merge functions, while GitHub provides code hosting and collaboration tools such as PullRequest and Issues to improve team collaboration efficiency.

GitHub: Discovering, Sharing, and Contributing to CodeGitHub: Discovering, Sharing, and Contributing to CodeMay 08, 2025 am 12:26 AM

GitHub is the preferred platform for developers to discover, share and contribute code. 1) Find specific code bases through search functions, such as Python projects. 2) Create a repository and push code to share with developers around the world. 3) Participate in open source projects and contribute code through Fork and PullRequest.

Using Git with GitHub: A Practical GuideUsing Git with GitHub: A Practical GuideMay 07, 2025 am 12:11 AM

Git is a version control system, and GitHub is an online platform based on Git. The steps to using Git and GitHub for code management and team collaboration include: 1. Initialize the Git repository: gitinit. 2. Add files to the temporary storage area: gitadd. 3. Submit changes: gitcommit-m"Initialcommit". 4. Related to the GitHub repository: gitremoteaddoriginhttps://github.com/username/repository.git. 5. Push code to GitHub: gitpush-uoriginmaste

GitHub's Impact: Software Development and CollaborationGitHub's Impact: Software Development and CollaborationMay 06, 2025 am 12:09 AM

GitHub has a far-reaching impact on software development and collaboration: 1. It is based on Git's distributed version control system, which improves code security and development flexibility; 2. Through functions such as PullRequest, it improves team collaboration efficiency and knowledge sharing; 3. Tools such as GitHubActions help optimize the development process and improve code quality.

Using GitHub: Sharing, Managing, and Contributing to CodeUsing GitHub: Sharing, Managing, and Contributing to CodeMay 05, 2025 am 12:12 AM

The methods of sharing, managing and contributing code on GitHub include: 1. Create a repository and push code, and write README and LICENSE files; 2. Use branches, tags and merge requests to manage code; 3. Fork the repository, modify and submit PullRequest contribution code. Through these steps, developers can effectively use GitHub to improve development efficiency and collaboration capabilities.

Git vs. GitHub: A Comparative AnalysisGit vs. GitHub: A Comparative AnalysisMay 04, 2025 am 12:07 AM

Git is a distributed version control system, and GitHub is a Git-based collaboration platform. Git is used for version control and code management, while GitHub provides additional collaboration features such as code review and project management.

Git vs. GitHub: Understanding the DifferenceGit vs. GitHub: Understanding the DifferenceMay 03, 2025 am 12:08 AM

Git is a distributed version control system, and GitHub is an online platform based on Git. Git is used for version control, branch management and merger, and GitHub provides code hosting, collaboration tools and social networking capabilities.

GitHub: The Frontend, Git: The BackendGitHub: The Frontend, Git: The BackendMay 02, 2025 am 12:16 AM

Git is a back-end version control system, and GitHub is a front-end collaboration platform based on Git. Git manages code version, GitHub provides user interface and collaboration tools, and the two work together to improve development efficiency.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor