File management method based on GIT

By creating an intuitive directory structure in the GIT system and integrating operation buttons, the problem of inefficient file management in the GIT system is solved, and efficient file retrieval and optimized storage resource utilization are achieved.

CN119537315AActive Publication Date: 2025-02-28GANSU WANWEI INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411648025.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-28
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Existing GIT systems have problems with inefficient query efficiency and excessive consumption of local storage space in file management.

Method used

By creating an intuitive directory structure, displaying files and folders in the GIT repository, and integrating operation buttons such as download, update and delete in the directory, simplifying file management tasks and optimizing storage efficiency.

Benefits of technology

It improves the convenience and efficiency of file retrieval, reduces the demand for local storage space, and ensures data reliability and optimized utilization of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119537315A_ABST
    Figure CN119537315A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a file management method based on GIT. And displaying files and folders in the GIT warehouse through a visual directory structure. According to the method, the user can easily execute the management task of the file and the folder through the embedded operation of the system, so that the retrieval process of the data is greatly simplified, and the demand on the disk space is effectively reduced. Through the method, not only is the convenience of file management optimized, but also the storage efficiency is improved, and a more economical and efficient solution is provided for enterprise data management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a file management method based on GIT. Background Art

[0002] In the daily operation of an enterprise, it is often necessary to store and maintain a large amount of documents and data. The Git Distributed Revision Control System (GIT) provides an efficient solution that can not only save the historical versions of files, but also effectively control their versions. GIT is similar to a dynamically updated file library that can store various types of files and mark different versions through a tag system, allowing users to obtain the latest version or restore to an old version at any time.

[0003] However, as the project continues to develop, the GIT repository may accumulate a large number of files, which may make file retrieval complicated, and when these files and materials are synchronized to the local, they may take up a considerable amount of local storage space. This situation not only increases the time required to retrieve files, but also increases the time cost.

[0004] Therefore, an improved GIT-based file management method is needed to solve the problems of low query efficiency and excessive consumption of local storage space in the existing system. Summary of the invention

[0005] This invention aims to introduce an innovative file management method based on GIT. The core advantage of this invention is that it can display files and folders in the GIT repository through an intuitive directory structure. Users can easily perform file and folder management tasks through the system's built-in operations, which greatly simplifies the data retrieval process and effectively reduces the demand for disk space. Through this method, we not only optimize the convenience of file management, but also improve storage efficiency, providing a more economical and efficient solution for enterprise data management.

[0006] A file management method based on GIT, comprising the following steps: Get file resource information in the GIT repository Based on the pre-configured GIT account information, the specific location of the file resources in the repository is located; through recursive technology, the system will traverse each folder level, collect and record the names of folders and files, and record their URL addresses in detail; during the collection process, the system has the ability to identify duplicate file names and will immediately mark files with the same name when they are detected; Simplify the download process of GIT files When the user clicks to download, the system will intelligently determine the path to be detected based on the local path set by the user and the specific location of the download in the GIT directory; the system will check whether the path already exists in the local system; if the detected path does not exist locally, the system will automatically create this path and synchronously check out the file resources selected by the user from the GIT repository to the newly created local path; If it is detected that the local path specified by the user already exists, the system will first determine whether the download button clicked by the user is for a folder or a single file; if the user clicks the download button for a folder, the system will clear all files and subfolders previously created by GIT in the folder, and then perform a new checkout operation to update the GIT file resource corresponding to the download button to the local path; For the single file download logic, if a file with the same name already exists in the path to be detected, the system will first delete the file and then check out the file resource selected by the user from the GIT repository to the local path. If the corresponding file is not found in the path to be detected, the system will directly check out the selected GIT file resource to the local path; the user can actively initiate a file update request by clicking the Update button.

[0007] The system will accurately determine the path to be detected for the files that need to be updated based on the user's preset local path and the location of the update button in the GIT directory; the system will first check whether the path already exists in the local environment. If it does not exist, the system will automatically create this path; regardless of whether the path to be detected is newly created or already exists, the system will perform a checkout operation to synchronize the GIT file resources associated with the update button to the local path.

[0008] Also includes: Deletion operations on GIT files and folders: When the user clicks Delete, the system first identifies whether the operation is for a folder or a single file; Folder Deletion: If the user clicks to delete a folder, the system will determine the local path of the folder to be deleted based on the preset local path and the location in the GIT directory; if the path exists locally, the system will delete all files and subfolders managed by GIT under the path, remove the corresponding folder in the GIT repository, and record the reason for deletion; File Deletion: If the user clicks the delete button for a file, the system will also determine the local path of the file; if the local path exists and contains the corresponding file, the system will delete the file and simultaneously delete it in the GIT repository, while noting the reason for deletion; if the local path does not contain the corresponding file, the system will directly delete the file from the GIT repository and record the reason for deletion.

[0009] In an embodiment of the present invention, the functionality of the system is further enhanced: Information integration: The system will actively obtain key information of the GIT repository and realize intelligent association with the local GIT directory.

[0010] Beneficial effects of the present invention A novel file management strategy is proposed, which is specially optimized for the GIT version control system; operation buttons are configured for each file and folder in the local directory to implement intuitive file management operations, such as downloading, updating and deleting, which improves the efficiency of users compared to the traditional command line form; ensure that local files are synchronized with the versions in the GIT warehouse, reduce redundancy and waste of storage space. The utilization rate of storage space is improved while ensuring the reliability of data. This technical solution is what the inventor wants to protect. The corresponding beneficial effect is that through intuitive directories and operation buttons, users can quickly locate and access the required file resources, and automated file synchronization and management reduce the need for manual operations, reduce error rates, ensure the consistency of local files with the GIT warehouse, and improve data reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flowchart of a file management method based on GIT; Figure 2 A schematic diagram of a GIT resource acquisition process in an embodiment; Figure 3 A schematic diagram of the GIT file download process of an embodiment; Figure 4 A schematic diagram of the GIT file update process of an embodiment; Figure 5 A schematic diagram of the GIT file deletion process of an embodiment; Figure 6 It is a structural block diagram of a file management device; Figure 7 A schematic diagram of the internal structure layout of a computer device; DETAILED DESCRIPTION

[0012] The core goal of the present invention is to develop an advanced file management solution based on GIT, which includes an innovative file management method, corresponding management equipment, a machine-readable storage medium, and a dedicated electronic device. This method creates a clear directory view to display the files and folders in the GIT repository in an orderly manner. At the same time, by integrating operation buttons in the directory, users can conveniently perform file and folder management tasks, optimize the retrieval process, and significantly reduce the storage space occupied.

[0013] To achieve this goal, the primary aspect of the present invention relates to a detailed GIT-based file management method, the specific steps of which include: collecting file resource information in the GIT repository, which includes detailed folder and file data, such as names and corresponding URL links; using predefined local paths and the collected file resource information to build an initial directory that matches the GIT repository structure; configuring corresponding operation buttons for each folder and file in the initial directory to form a GIT directory, and these buttons will directly support the management function of file resources; using the generated GIT directory to perform efficient management operations on files in GIT.

[0014] With this approach, we not only make file retrieval more intuitive and convenient, but also optimize the use of storage resources by reducing unnecessary local storage requirements.

[0015] In the implementation case of the present invention, we took the following steps to accurately obtain the file resource information in the GIT repository: Using GIT account positioning: The system will quickly locate the specific location of file resources in the warehouse based on the pre-configured GIT account information. Recursive information retrieval: Through deep digging with recursive technology, the system will traverse each folder level, collect and record the names of folders and files, and record their URL addresses in detail. Intelligent duplicate file detection: During the collection process, the system has the ability to identify duplicate file names and will immediately mark files with the same name when they are detected to ensure that users can clearly distinguish them.

[0016] In the implementation case of the present invention, we introduce a series of operation buttons, among which the download button is designed to simplify the download process of GIT files. The following is a detailed description of the download function: User interaction response: When the user clicks the download button, the system will respond to this operation immediately. Path determination: The system will intelligently determine the path to be detected based on the local path set by the user and the specific location of the download button in the GIT directory. Local path check: The system will check whether the path already exists in the local system. Path creation and resource synchronization: If the detected path does not exist locally, the system will automatically create this path and synchronously check out the file resources selected by the user from the GIT repository to the newly created local path.

[0017] In the implementation case of the present invention, the download process is further optimized to adapt to different user operation scenarios: Processing when the local path already exists: If it is detected that the local path specified by the user already exists, the system will first determine whether the download button clicked by the user is for a folder or a single file. Folder download logic: When the user clicks the download button of a folder, the system will clear all files and subfolders previously created by GIT in the folder, and then perform a new checkout operation to update the GIT file resource corresponding to the download button to the local path.

[0018] Single file download logic: If a file with the same name already exists in the path to be detected, the system will first delete the file and then check out the file resource selected by the user from the GIT repository to the local path.

[0019] If the corresponding file is not found in the path to be detected, the system will directly check out the selected GIT file resource to the local path.

[0020] In the embodiment of the present invention, we specially design an update button to simplify the update process of GIT files: Update operation trigger: Users can actively initiate a file update request by clicking the update button. Path positioning: The system will accurately determine the path to be detected for files that need to be updated based on the local path preset by the user and the position of the update button in the GIT directory. Local path detection and creation: The system will first check whether the path already exists in the local environment. If it does not exist yet, the system will automatically create this path. File resource update: Regardless of whether the path to be detected is newly created or already exists, the system will perform a checkout operation to synchronize the GIT file resources associated with the update button to the local path.

[0021] In an embodiment of the present invention, we introduce a delete button to implement efficient deletion of GIT files and folders: Identification of deletion operations: When the user clicks the Delete button, the system first identifies whether the operation is for a folder or a single file. Folder deletion process: If the user clicks the Delete button for a folder, the system will determine the local path of the folder to be deleted based on the preset local path and the location in the GIT directory. If the path exists locally, the system will delete all files and subfolders managed by GIT under the path, remove the corresponding folders in the GIT repository, and record the reason for the deletion. File deletion process: If the user clicks the Delete button for a file, the system will also determine the local path of the file.

[0022] If the local path exists and contains the corresponding file, the system will delete the file and delete it synchronously in the GIT repository, while noting the reason for the deletion. If the local path does not contain the corresponding file, the system will directly delete the file from the GIT repository and record the reason for the deletion.

[0023] In an embodiment of the present invention, the functionality of the system is further enhanced: Information integration: The system will actively obtain key information of the GIT repository and realize intelligent association with the local GIT directory.

[0024] The second aspect of the present invention relates to a structured GIT file management device, which is composed of the following core components: Acquisition module: responsible for extracting file resource information from the GIT repository. This includes detailed folder and file data, such as their respective names and associated URL addresses. First construction module: using the captured file resource information and predefined local paths to build an initial directory structure. This structure will accurately reflect the hierarchical relationship between folders and files in the GIT repository. Second construction module: based on the initial directory, configure corresponding operation buttons for each folder and file to create a fully functional GIT directory. These buttons will directly support the management of file resources. Management module: responsible for performing file management tasks based on the GIT directory to ensure that users can efficiently add, modify, delete and other operations on files.

[0025] The third aspect of the present invention introduces a special electronic device, which consists of the following key parts: Efficient processor: The device is equipped with at least one high-performance processor responsible for performing complex data processing tasks. Advanced memory: The memory connected to the processor contains a series of carefully compiled instruction sets designed specifically for implementing the aforementioned GIT file management method.

[0026] A fourth aspect of the present invention relates to a specially designed machine-readable storage medium having the following characteristics: Storage media: This is a well-designed storage device that can be directly read and parsed on the machine side.

[0027] Instruction set storage: This storage medium carries a series of specialized instructions that are carefully designed to guide the processor to perform specific tasks. Configure the processor: When the processor reads and executes these stored instructions, it automatically configures itself to implement the above-mentioned GIT file management method, ensuring the automation and efficiency of the method.

[0028] Through the above technical solution, an efficient GIT file resource management mechanism is realized. The specific process and advantages are as follows: Resource information acquisition: The system automatically collects file resource information in the GIT repository, including the names of folders and files and their corresponding URL addresses. Directory structure construction: Based on the local preset path and the collected file resource information, the system constructs an initial directory that accurately maps the hierarchical structure of the GIT repository. Operation interface design: In the initial directory, each folder and file is equipped with a corresponding operation button to form an intuitive GIT directory interface. File management function: Through the GIT directory, users can easily perform file and folder management tasks without downloading the entire resource library to the local. Resource retrieval optimization: Users can quickly locate and access the required files and materials, greatly reducing retrieval time and local storage space usage. Local storage savings: The system only retains the file parts required by the user, avoiding unnecessary waste of local disk space. Simplified management operations: Through the operation buttons integrated in the directory, users can easily add, modify, delete and other operations of files, improving management efficiency.

[0029] Through these innovative steps, the present invention provides users with an intuitive, efficient, and resource-saving GIT file management solution, optimizes the file retrieval process, improves work efficiency, and reduces the consumption of system resources.

[0030] The following is a detailed explanation of the embodiments of the present invention through the accompanying drawings. It should be clear that these descriptions are intended to illustrate the concept of the invention, not to limit the scope of the invention.

[0031] In the embodiments of the present invention, the use of serial numbers such as "first" and "second" is only for convenience of description and does not represent any form of priority or quantity limitation. The elements referred to by these serial numbers may be one or more, depending on the requirements of the actual application.

[0032] In addition, the technical solutions in different embodiments can be combined with each other, but such combination must be within the scope of technical rationality and feasibility. If the combination of technical solutions is contradictory or infeasible in practice, such combination will not be regarded as part of the present invention and will not be included in the protection scope of the present invention.

[0033] An embodiment of the present invention introduces an innovative GIT file management method, which recursively traverses the folders in the GIT repository to capture the detailed path of each folder and the name of the internal file. After successfully capturing these resource information, the system automatically generates a directory interface containing update, download and delete functions, allowing users to easily perform corresponding operations on folders and files in GIT. The advantage of this method is that it not only speeds up the search and location of resources in the GIT library, but also optimizes the use of storage space by retaining only necessary files on the local disk. In order to demonstrate this solution more intuitively, this embodiment uses Excel as an example for explanation, but also emphasizes that the solution is also applicable to other implementation forms and is not limited to specific tools.

[0034] Suppose a cross-departmental team needs to jointly maintain multiple files. As the number of files increases, the team faces problems such as difficulty in file retrieval, complex version control, and duplicate submission. For these business scenarios, it is necessary to implement technical requirements such as fast retrieval mechanism, version comparison and merging, and intelligent duplicate file detection. The GIT-based file management method proposed in this patent can provide an effective solution for the above business scenarios.

[0035] The following is a further description of the advantages of the present invention over the prior art with reference to the accompanying drawings and specific embodiments: Please refer to Figure 1 , Figure 1 The following is a schematic diagram of a process flow of a GIT-based file management method according to an embodiment of the present application. This embodiment provides a GIT-based file management method, including the following steps: Step A1: Get the file resource information in GIT; this information combines multi-level folder descriptions and file attributes, where folder data includes their respective identification names and direct access URL paths, and file information is accurate to the name of each file and its location URL; In this embodiment, the above steps adopt a structured method to obtain file resource information in the GIT repository: Access and traversal: By accessing the GIT repository, the system will traverse the folder and file structure and record the name of each folder and file in detail. URL recording: While recording the folder and file names, the system will also capture and record their respective URL addresses. Automated implementation: Taking Excel as the operation interface as an example, we use Java language to call GIT's API to automate the traversal process, and record the file name through the table processing library.

[0036] Detailed process: First, the system will use the preset GIT account information to locate the specific location of the file resource.

[0037] Next, a recursive method is used to drill down into each folder level, collecting the names and URLs of folders and files.

[0038] Finally, the system will detect duplication of file names and mark them accordingly when duplicate names are found.

[0039] In this embodiment, we adopt the following steps to efficiently manage GIT account information and optimize the acquisition of file resources: GIT account configuration: Preset GIT account information in Excel, including user name, password, and data URL, to lay the foundation for locating GIT resources. Automated resource location: Use Java to call the GIT API to automatically locate resources based on configuration information, and use a recursive strategy to deeply search each layer of folders and their file names in the GIT path. Information recording and organization: Record the retrieved file path, file name, and folder URL in detail in an Excel sheet to ensure the orderliness and traceability of the information. Duplicate file detection and marking: During the recording process, the system will check and mark files with the same name, and remind users through color highlighting and annotations to avoid duplicate file submissions. Resource management optimization: Through these measures, we not only reduce the waste of disk space caused by duplicate files in the GIT repository, but also optimize the use of local disk space and avoid unnecessary data synchronization.

[0040] As a comparison, the existing methods generally rely on manual and disorderly classification and sorting of files, while this solution creates a clear directory view to display the files and folders in the GIT repository in an orderly manner, improving the intuitiveness and convenience of file retrieval. Users can quickly locate the required files through the intuitive directory structure, reducing query time and improving retrieval efficiency.

[0041] Step A2: Using the predefined local path combined with the file resource information, the system will build an initial directory structure. This initial directory will accurately reflect the hierarchical relationship of folders and files in the GIT repository to ensure the consistency of the directory structure; In this embodiment, we define a local path as the preset location for storing GIT files. All folders and files checked out from GIT are uniformly stored under this path. The local path is a storage location pre-set by the user on the local computer, and should contain sufficient information to ensure a clear organizational structure of the file, such as the path d: / Project / , where d: / represents the storage drive letter and Project is the classification name, which ensures the classified storage of the file. In this way, we can classify file resources according to folders and record their URLs simultaneously when recording their names, so as to build an initial directory that matches the GIT warehouse structure. This initial directory supports multi-level cascading. For example, the first-level directory may be named "local path 1", and the second-level directory under it may be "folder 1", which may contain "file 1" and "file 2", etc. Such a structured directory is not only easy to manage and access, but also ensures consistency with the storage layout of the GIT warehouse, allowing users to directly access file resources in GIT through the local initial directory.

[0042] As a comparison, the existing method generally requires users to manually create local directories, which may lead to low retrieval efficiency due to path confusion. However, this solution can automatically build local directories based on the GIT warehouse structure without the need for users to manually set them up. At the same time, it ensures that the local directory structure is consistent with the hierarchical relationship of the GIT warehouse, reducing the time users spend navigating between different directories and significantly improving the work efficiency of users.

[0043] Step A3: In the initial directory, dedicated operation buttons are provided for each folder and file, thus forming a fully functional GIT directory. These buttons are designed to simplify the management of file resources in the GIT repository, allowing users to perform various file operations through an intuitive interface; In this embodiment, the initial directory integrates the folders recorded in the GIT warehouse and the folders associated with the local path. The directory is equipped with a variety of operation buttons, such as update, download and delete, etc. These buttons are intended to implement corresponding management functions for folders and files in GIT.

[0044] The design of the operation buttons is flexible and can be used individually or in combination according to actual needs. Different folders or files can be configured with different numbers and types of buttons. For example, in the Excel-based implementation, these buttons are placed in the adjacent cells of the row where the corresponding folder or file is located, which is convenient for users to quickly access and manage. Such a layout design ensures the intuitiveness of the user interface and the convenience of operation.

[0045] Taking Excel operation as an example, this embodiment shows the detailed process of how to use GIT resources to generate a GIT directory, such as Figure 2 As shown, Figure 2 A schematic diagram of the process is provided.

[0046] First, the user needs to enter the GIT username, password and repository URL into Excel (if it has been saved, there is no need to repeat this step). Then, the system will retrieve all folders and files associated with the current account on the GIT server, organize these file names according to the folder structure in Excel, and record the URL of each folder and file.

[0047] During the recording process, the system detects and identifies files with the same name and highlights these duplicates with color tags and annotations. After the recording is completed, an operation button will be added next to each folder and file entry in Excel, allowing users to perform GIT operations such as downloading, updating, and deleting, thereby building a complete GIT directory. This process not only improves the efficiency of file management, but also enhances the intuitiveness and convenience of operation.

[0048] Step A4: Use the constructed GIT directory to achieve systematic management of GIT files; In this embodiment, the GIT directory records the file resources in the warehouse in detail, allowing users to quickly locate and access the required GIT library resources. In addition, operation buttons are embedded in the directory, and users can easily perform various management tasks on files and folders through these buttons, such as updating, downloading, and deleting, thereby optimizing the management process.

[0049] As a comparison, the existing methods for GIT file operations are generally performed through command lines. In this solution, the dedicated operation buttons can significantly reduce the time users spend on operations. At the same time, the intuitive operation buttons reduce the number of mistakes users make during file management, such as accidentally deleting or updating the wrong version of files.

[0050] The following describes the management operations implemented by the Download button, Update button, and Delete button respectively: In this embodiment, we elaborate on the GIT file management operations implemented by the download button, update button and delete button; Downloading the GIT file based on the constructed GIT directory includes the following steps: Download button response: After the user clicks the download button, the system will automatically determine and create the corresponding local directory (for example, "d:test / 123 / " or "d:test / 123 / 456") based on the preset local path and the position of the button in the GIT directory. Path detection and creation: The system first checks whether the path already exists locally. If it does not exist, the system will create a new path; if it already exists, the system will further analyze the nature of the download button. File or folder processing: If the download button is associated with a folder, the system will clean up the original GIT files and folders in the directory, and then check out the latest resources from the GIT repository to the path. If a single file is associated, the system will delete the existing file with the same name and replace it with the latest version in the GIT repository if it confirms that the local path exists. Automated download process: Use Java to call GIT's API to achieve automated file downloads, ensuring that users can quickly obtain the required resources. Resource management optimization: Through this process, users can avoid unnecessary downloads of the entire library and only synchronize the required files or folders, effectively reducing the use of local storage space. Operation interface example: such as Figure 3 As shown, the Excel-based implementation provides an intuitive operation interface, allowing users to clearly see each step of the download process.

[0051] Through these steps, we provide users with an efficient and intuitive method for downloading and managing GIT files, optimize the operation experience, and improve the efficiency of resource management.

[0052] Update the GIT file based on the constructed GIT directory, including the following steps: Update button function: The Update button is specially designed to perform the update operation of GIT files. Update process starts: After the user clicks the Update button, the system will determine the local path of the file or folder to be updated based on the local preset path and the position of the button in the GIT directory. Local path processing: If the local path does not exist, the system will automatically create the path and check out the corresponding GIT resources to the newly created path.

[0053] If the path already exists, the system will directly update the file or folder under this path.

[0054] Automatic update operation: Use Java to call GIT's pull API to achieve automatic update of files or folders, ensuring that users can quickly synchronize the latest version. Resource management optimization: By accurately controlling update operations, users can avoid unnecessary full updates and reduce file synchronization and local storage space consumption. Operation interface example: For example Figure 4 As shown, the Excel-based implementation provides a clear operation interface that shows each step of the update process.

[0055] Deleting GIT files based on the constructed GIT directory includes the following steps: Delete button response: After the user clicks the delete button, the system first determines whether the button is associated with a folder or a single file. Folder deletion process: If the button is associated with a folder, the system will determine the path to be deleted based on the local preset path and button position, and check whether the path exists locally.

[0056] If the path exists, the system will delete all files and folders managed by GIT under the path, remove the corresponding folders in the GIT repository, and record the reason for the deletion.

[0057] If the path does not exist, the system will only delete the corresponding folder from the GIT repository and record the reason for deletion.

[0058] File deletion process: If the button is associated with a file, the system will also determine the local path of the file and check whether the file exists. If the file exists, the system will delete the local file and remove the corresponding file from the GIT repository, while recording the reason for deletion. If the file does not exist, the system will directly delete the file from the GIT repository and record the reason for deletion.

[0059] Automated deletion: Use Java to call GIT's commit API to achieve automated deletion of files or folders. Operation interface example: The Excel-based implementation provides an intuitive operation interface that clearly shows each step of the deletion process. Resource management optimization: By precisely controlling the deletion operation, users can avoid accidental deletion, while reducing unnecessary file synchronization and optimizing the use of local storage space.

[0060] In the above implementation process, we adopted a systematic approach to manage and display file resources in GIT: File resource information collection: The system automatically captures file resource information in the GIT repository, including the names of folders and files and their corresponding URLs. Directory construction: Using the collected information, the system builds an initial directory based on the preset local path. The hierarchical structure of the directory is exactly the same as the structure in the GIT repository. Operation interface design: In the initial directory, corresponding operation buttons are configured for each folder and file, forming an intuitive GIT directory, allowing users to easily perform management operations such as downloading, updating, and deleting. Resource display and retrieval optimization: Through this directory display, users can quickly browse and retrieve files and folders in the GIT resource library without downloading the entire repository to the local, which greatly reduces the search time and reduces the occupancy of local storage space. Local storage efficiency: Users only need to keep the parts of the files they care about. The system supports fast retrieval and execution of necessary file operations, reducing the waste of local disk space.

[0061] Management action execution: Through the operation buttons in the directory, users can easily manage files and folders, including but not limited to downloading required resources, updating existing files, and deleting files that are no longer needed.

[0062] Through these steps, the present invention provides users with an intuitive, efficient and resource-saving GIT file management solution, optimizes the file retrieval process, improves work efficiency, and reduces the consumption of system resources.

[0063] In an embodiment of the present invention, the acquisition of GIT library information and directory association are achieved through the following steps: GIT library information integration: The system automatically obtains GIT library information including resource library name, user name, password, GIT URL and local storage path. Configuration and display: Based on Excel, the system has designed a configuration page for displaying and editing GIT library information. Through this page, users can easily view and manage the configuration of each GIT library. Dynamic directory association: The system provides a get button and an update button for initializing and refreshing the GIT directory. Click the get button, and the system will create a new sheet page in Excel, named after the GIT library, and fill in the corresponding GIT directory information. Once the acquisition operation is completed, the get button will be disabled, and only the update button will be retained for subsequent use. Real-time resource update: When you click the update button, the system will pull the latest resources from the GIT library again and refresh the corresponding sheet page to ensure that users always have the latest directory information. Result page display: The result page displays the GIT directory in the form of folder grouping. Each file or folder is equipped with a download, update, and delete button next to it, allowing users to easily perform synchronization operations on resources in the local and GIT libraries. Multi-repository management: The system supports the management of information of multiple GIT repositories, allowing users to associate different GIT repository information with corresponding GIT directories to achieve centralized management, greatly improving the efficiency of searching for files and information.

[0064] Through these innovative steps, the present invention provides users with a centralized, dynamic and user-friendly GIT library management solution, optimizing resource management and retrieval processes in a multi-library environment.

[0065] As a comparison, the existing methods for GIT file operations are generally performed through command lines, which is time-consuming and laborious. In this solution, users can quickly and easily download, update, delete, and other operations on files through the created file directory structure and operation buttons, which improves user work efficiency.

[0066] Figure 6 The following is a block diagram of the structure of a GIT-based file management device according to an embodiment of the present invention. The file management device according to this embodiment is an integrated system consisting of the following core modules: Acquisition module M1: This module is responsible for capturing file resource information within the GIT repository, including detailed information on folders and files and their corresponding URLs. First construction module M2: Using the acquired file resource information, this module builds an initial directory based on a preset local path, accurately replicating the hierarchical structure of the GIT repository. Second construction module M3: Based on the initial directory, this module adds operation buttons to each folder and file, creating a fully functional GIT directory so that management actions can be performed through these buttons. Management module M4: This module enables users to perform file management tasks based on the constructed GIT directory, including but not limited to downloading, updating, and deleting files.

[0067] The above modules are all encapsulated as program units and stored in the memory of the device. The device can realize various functions of its file management by executing these stored program units through the processor.

[0068] In one embodiment, a computer device is provided, which can be used as a terminal, and its internal structure is as follows: Figure 7 The device consists of the following main components: Processor A01: As the core of the device, it is responsible for providing the necessary computing and control functions. Network interface A02: Allows the device to communicate with external terminals through the network. Display screen A04: Can be a liquid crystal display or an electronic ink display, used to display user interfaces and information. Input device A05: May include a touch layer, buttons, trackball, touchpad, or an external keyboard and mouse for user interaction with the device.

[0069] Memory: includes internal memory A03 and non-volatile storage medium A06, the latter of which stores the operating system B01 and computer program B02, while the internal memory A03 provides support for the operation of these software.

[0070] When the processor A01 executes the computer program B02 stored in the non-volatile storage medium A06, a GIT-based file management method is implemented, which optimizes the file management and operation process.

[0071] Technicians should understand that Figure 7 The structure shown is only a partial block diagram related to the present application scheme, and it does not limit the structure of the computer device to which the present scheme is applicable. In fact, the computer device may include more components than shown in the figure, or less, and the components may be combined or arranged in different ways.

[0072] In one embodiment, the GIT-based file management device provided by the present application is implemented in the form of a computer program. The program can be used in the following manner: Figure 7The memory of the device stores various program modules constituting the file management device, such as Figure 6 The acquisition module M1, the first construction module M2, the second construction module M3 and the management module M4 shown in the figure together constitute a complete computer program to instruct the processor to execute each step of the GIT-based file management method described in this application.

[0073] Specifically, Figure 7 The computer device in the embodiment can perform the corresponding steps through the following modules: Step A1 is performed by acquiring module M1.

[0074] Step A2 is performed by a first building block M2.

[0075] Step A3 is performed by the second building block M3.

[0076] Step A4 is performed by the management module M4.

[0077] The present application describes in detail the methods, devices (systems) and computer program products in the embodiments through flow charts and / or block diagrams. Each step or box in these diagrams, and their combination, is implemented by computer program instructions. These instructions can be loaded onto various types of computers or data processing devices, including general-purpose computers, special-purpose computers, embedded processors, etc., to form a machine capable of performing specified functions.

[0078] In addition, the use of the terms "includes", "comprising" and their variations is intended to express an open inclusion that is not limited to the elements explicitly listed. This means that the process, method, product or apparatus described may include other elements not explicitly listed, or include elements inherent to these processes, methods, products or apparatuses. In the absence of explicit limitations, the use of the expression "comprising a..." does not mean to exclude the existence of other identical or similar elements.

[0079] Importantly, the embodiments described above are only examples and are not intended to limit the scope of the present application. For those skilled in the art, the implementation of the present application may have multiple changes and adjustments. Any modification, equivalent replacement or improvement made under the guidance of the spirit and principles of the present application should be deemed to be included in the scope of the claims of the present application.

[0080] Glossary Uniform Resource Locator (URL): It is a concise representation of the location and access method of resources available on the Internet. It is the address of standard resources on the Internet.

[0081] Application Programming Interface (API): is a set of predefined functions that aims to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism.

[0082] GIT: Git Distributed Revision Control System, distributed version control system.

[0083] Java: is a high-level, object-oriented computer programming language.

[0084] pull: is a command in GIT, and checkout is used to output the GIT resources to be checked out.

[0085] Checkout: is a command in GIT, and pull is used to output the GIT resources to be updated.

Claims

1. A file management method based on GIT, characterized in that The steps include: Get file resource information in the GIT repository Based on the pre-configured GIT account information, the specific location of the file resources in the repository is located; through recursive technology, the system will traverse each folder level, collect and record the names of folders and files, and record their URL addresses in detail; during the collection process, the system has the ability to identify duplicate file names and will immediately mark files with the same name when they are detected; Simplify the download process of GIT files When the user clicks to download, the system will intelligently determine the path to be detected based on the local path set by the user and the specific location of the download in the GIT directory; the system will check whether the path already exists in the local system; if the detected path does not exist locally, the system will automatically create this path and synchronously check out the file resources selected by the user from the GIT repository to the newly created local path; If it is detected that the local path specified by the user already exists, the system will first determine whether the download button clicked by the user is for a folder or a single file; When the user clicks the download button of a folder, the system will clear all files and subfolders previously created by GIT in the folder, and then perform a new checkout operation to update the GIT file resources corresponding to the download button to the local path; Single file download logic: if a file with the same name already exists in the path to be detected, the system will delete the file first, and then check out the file resource selected by the user from the GIT repository to the local path; If no corresponding file is found in the path to be detected, the system will directly check out the selected GIT file resource to the local path; Users can actively initiate a file update request by clicking the update button; The system will accurately determine the path to be tested for files that need to be updated based on the user's preset local path and the location of the update button in the GIT directory; the system will first check whether the path already exists in the local environment; If it does not exist yet, the system will automatically create this path; regardless of whether the path to be detected is newly created or already exists, the system will perform a checkout operation to synchronize the GIT file resources associated with the update button to the local path.

2. A GIT-based file management method according to claim 1, characterized in that Also includes: Deletion operations on GIT files and folders: When the user clicks Delete, the system first identifies whether the operation is for a folder or a single file; Folder Deletion: If the user clicks to delete a folder, the system will determine the local path of the folder to be deleted based on the preset local path and the location in the GIT directory; if the path exists locally, the system will delete all files and subfolders managed by GIT under the path, remove the corresponding folder in the GIT repository, and record the reason for deletion; File Deletion: If the user clicks the delete button for a file, the system will also determine the local path of the file; if the local path exists and contains the corresponding file, the system will delete the file and simultaneously delete it in the GIT repository, while noting the reason for the deletion; if the local path does not contain the corresponding file, the system will directly delete the file from the GIT repository and record the reason for the deletion; Information integration: The system will actively obtain key information of the GIT repository and realize intelligent association with the local GIT directory.

Citation Information

Patent Citations

  • Resource file management method and device

    CN108228846A

  • List controller code automatic adding method and device and readable storage medium

    CN108563440A

  • File uploading method, file downloading method and file uploading system

    CN113535669A