# 教程 本项目使用的教程 ## 初始化项目 1. 创建空分支 ```bash # 新项目 git init git branch -m docs ``` ```bash # 已存在的项目,创建空分支 git switch --orphan docs ``` 2. 将本项目的文件下载至创建的翻译项目 ```bash curl -fsSL https://fx4.cn/gendocs | bash ``` 3. 更新上游项目链接 ```bash GIT_DOCS=含.git结尾的项目地址 sed -i "s#https://github.com/xxx/docs.git#${GIT_DOCS}#g" *.* sed -i "s#https://github.com/xxx/docs.git#${GIT_DOCS}#g" .github/workflows/docs.yml ``` 4. 设置项目地址 ```bash # 新项目 git remote add origin ``` ```bash # 已存在的项目 git remote set-url origin ```