In Git, there are methods to undo (roll back) a merge operation

In Git, there are several ways to undo (rollback) merge an operation, depending on whether a commit has been made, whether a push has been made, and whether a history needs to be retained. Here are some common undo  merge methods: 1. Not submitted  merge (not submitted  commit) If  merge you haven’t submitted it yet, you can use the following methods to undo … Read more

Git remote operation and tag management

I. Remote Operation 1.1 Distributed Version Control System A distributed version control system, simply put, is a central server repository connected to multiple local server repositories. This allows multiple developers to view their respective code. 1.2 Cloning a remote repository Using HTTPS protocol: There are no requirements when using HTTPS, and you can directly clone … Read more

Advanced Git Local Operations: Version Revert, Undo Changes, and File Deletion

Foreword: After mastering the basic operations of a Git local repository, “how to correct erroneous commits,” “how to recover accidentally deleted files,” and “the risks and solutions for version rollback” become key topics for developers to advance. In code development, accidental changes to configurations, committing redundant files, and deleting core code are unavoidable. Git’s version rollback, … Read more

MySQL transactions

I. Reasons for using transactions In many cases, we need to execute a set of operations that either all fail or all succeed. For example, in a bank transfer, one user transfers money to another, deducting funds from the first user’s account and increasing the second user’s balance. Imagine if the MySQL server crashes after … Read more

Advanced MySQL Database: Complete Analysis of SQL Query Statements

I. Basic Queries: Retrieving Data from Tables 1.1 Syntax Format 1.2 Practical Examples Assuming a table named `student` exists, containing fields `id`, `name`, `sex`, `age`, and `class_num`, a basic query is demonstrated: # Query all fields (* represents all fields) SELECT * FROM student; # Query specific fields (name, sex) SELECT name, sex FROM student; … Read more

Nginx deployment and usage

I. Gateway 1.  Nginx (Traffic Gateway) 2.  Gateway (Business Gateway) 3.  API Gateway Relationship summary: There are also mutual calls between the business gateway, API gateway, and microservices: Follow the five-tuple : source IP, source port, destination IP, destination port, protocol II. The Relationship Between DNS, Domain Names, and IP Addresses An IP address is a device’s “unique ID … Read more

301 HTTP Status Code Explained and Applied

When browsing the web, you may have encountered situations where clicking a link automatically redirects the page to another address. Or, to be more technical, as a website developer, you might need to upgrade your website’s domain  http:// or  https://redirect older pages to newer URLs. Behind these scenarios, an important HTTP status code is at play— 301 . What is … Read more

A comprehensive guide to used Git commands and commit/pull instructions.

1. Repository Initialization and Configuration 2. Remote warehouse operations # Add a remote repository: `git remote add origin <remote repository URL> ` # View remote repositories: `git remote -v` # Modify the remote repository URL: `git remote set-url origin <new remote repository URL> ` # Delete a remote repository: `git remote remove origin` 3. Branch … Read more

Exclude redundant directories such as node_modules in VSCode

VSCode Search Speed-Up Guide Chapter 1: Project Search Too Slow? One Trick to Solve VSCode Global Search Performance Bottleneck In large projects, VS Code’s global search (Ctrl+Shift+F) often becomes slow due to scanning too many files. However, with proper configuration  search.exclude settings, search performance can be significantly improved, avoiding traversal of unnecessary directories. Optimize search scope VS … Read more

Paper Reading Notes – Data Enhancement

First. Core idea: What is data augmentation? In summary, data augmentation is the process of artificially creating more and diverse new data from existing training data through a series of technical means. A simple analogy: Your model is like a student, and the training data is its exercise book. Scenario 1 (No Data Enhancement): The … Read more