Home >Development Tools >git >How to delete files in the warehouse in gitee

How to delete files in the warehouse in gitee

PHPz
PHPzOriginal
2023-03-31 09:08:414055browse

In recent years, with the continuous development and popularization of Internet technology, more and more programmers have begun to use open source code sharing platforms for project development and collaboration. Among them, Gitee is one of the most popular code hosting platforms in China and has been widely recognized and used. However, during long-term project maintenance, we will inevitably encounter situations where some files need to be deleted. So, how to delete files in the warehouse on Gitee?

First of all, there are two ways to delete files on Gitee: deleting through the web page and deleting through the Git tool. This article will introduce both methods.

1. Delete through the Web page

  1. Log in to Gitee and find the target warehouse;
  2. Enter the directory where the file to be deleted is located in the warehouse, as shown in the figure :

How to delete files in the warehouse in gitee

  1. Find the file you want to delete and click the "Delete" button on the right side of it:

How to delete files in the warehouse in gitee

  1. After clicking Confirm, the file will be completely deleted.

2. Delete through Git tool

  1. First, open the command line terminal and enter the local folder of the target warehouse;
  2. Use the following command to delete The file is deleted from the local library:
$ git rm <file></file>

where is the name of the file to be deleted.

  1. Commit changes and push them to Gitee:
$ git commit -m 'your reason for deleting file'
$ git push origin branch

Where branch is the name of the branch to be pushed.

Summary

The above are the two methods of deleting files in the warehouse on Gitee. Note: Once a file is deleted, it can never be recovered. Therefore, please confirm that the operation is correct before deleting files, and back up relevant data according to project needs.

In addition to the above, please also abide by Gitee's relevant usage regulations, operate compliantly, and jointly maintain a good open source community environment. Thanks for reading and happy programming!

The above is the detailed content of How to delete files in the warehouse in 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