How to Update bannedbook/fanqiang: Automated and Manual Methods
Run the gitupdate.sh script to pull the latest changes, commit local modifications, push to the master branch, and optionally tag releases with a single command.
The bannedbook/fanqiang repository is a curated collection of scripts, configurations, and documentation for circumvention tools. Keeping your local copy current ensures you receive the latest proxy configurations and security updates. Whether you prefer automation or manual control, the repository provides helper scripts and standard Git workflows to streamline the update process.
Quick Update Using the Bundled Scripts
The repository includes platform-specific helper scripts that execute the full Git workflow automatically.
Linux and macOS (gitupdate.sh)
The [gitupdate.sh](https://github.com/bannedbook/fanqiang/blob/master/gitupdate.sh) script handles pulling, committing, pushing, and tagging. It also configures core.autocrlf to true (line 2) to normalize line endings across operating systems.
# Make executable and run (from repository root)
chmod +x gitupdate.sh
./gitupdate.sh
Windows (gitupdate.bat)
For Windows environments, use the batch file gitupdate.bat, which mirrors the Bash script's functionality.
:: Run from Command Prompt or PowerShell in the repository folder
gitupdate.bat
Manual Git Commands to Update bannedbook/fanqiang
If you need granular control over the update process, execute the standard Git workflow manually:
# Ensure you are on the master branch
git checkout master
# Retrieve the latest commits from the remote repository
git pull origin master
# Stage any local modifications (optional, if you have custom changes)
git add -A
# Commit your changes with a descriptive message
git commit -m "update"
# Push commits back to the remote master branch
git push origin master
# Optional: Create and push a release tag
git tag -a "FQNews-v1.1.0" -m "FQNews-v1.1.0"
git push origin --tags
What the Automated Update Script Does
The [gitupdate.sh](https://github.com/bannedbook/fanqiang/blob/master/gitupdate.sh) script automates five specific operations:
git pull origin master(line 4): Fetches the newest commits from the remotemasterbranch.git add -A(line 5): Stages all new and modified files in the working directory.git commit -m "update"(line 6): Creates a commit with a generic message. You can edit the script to customize this message.git push origin master(line 7): Uploads the commit to the remote repository.- Tagging (lines 8-10): Creates an annotated tag
FQNews-v1.1.0and pushes it to the remote, useful for marking specific releases of the FQNews Android app.
Updating Platform-Specific Sub-Components
After updating the main repository, individual platform folders contain their own documentation that may require review. The subdirectories android/, windows/, router/, and macos/ each include markdown files (e.g., android/README.md) with specific setup instructions. No additional Git commands are required—these files update automatically when you pull the master branch.
Key files to reference after updating:
README.md: Central index of tutorials and download links.docs/: Contains Python generators likevsp.pythat build documentation sections.fqnews/: Source code for the FQNews Android application.
Summary
- Automated updates are handled by
gitupdate.sh(Linux/macOS) andgitupdate.bat(Windows), which execute pull, commit, push, and tag operations sequentially. - Manual updates follow standard Git workflow:
git pull origin master, optionallygit add -Aandgit commit, thengit push origin master. - The script sets
core.autocrlf=trueto prevent line-ending conflicts between Windows and Unix systems. - Platform-specific instructions in subdirectories update automatically with the main repository pull.
Frequently Asked Questions
How do I preserve my local configuration files when updating?
Run git add -A followed by git commit -m "my local changes" before executing git pull origin master. This commits your modifications to the local history, allowing Git to merge or fast-forward without overwriting your files.
What is the FQNews-v1.1.0 tag created by the update script?
This is an annotated Git tag used to mark specific release versions of the FQNews Android application included in the repository. The tag is pushed to the remote with git push origin --tags, enabling users to checkout specific stable versions if needed.
Can I use the update script if I have uncommitted changes?
Yes, but the script will fail if there are merge conflicts. It is recommended to commit or stash your changes first. The script runs git add -A and commits with the message "update", which will capture your modifications alongside the pulled changes.
Does the Windows batch file handle line endings correctly?
Yes. Both gitupdate.bat and gitupdate.sh configure git config core.autocrlf true at the beginning of execution. This setting automatically converts line endings to LF in the repository and CRLF in the working directory on Windows, preventing cross-platform compatibility issues.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →