Last active
March 19, 2026 07:30
-
-
Save cesclong/e060c428e6e324eb1be8b40b17a09e9c to your computer and use it in GitHub Desktop.
新 2. 生成【纯配置分支】(只留配置,代码=develop)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git checkout 你的分支名 | |
| git checkout -b feat/only-config | |
| git ls-files -z | grep -zvE '\.(json|yml|yaml|env|conf|ini|properties)$' | xargs -0I{} git checkout develop -- {} 2>/dev/null | |
| git add . | |
| git commit -m "chore: 仅配置改动,代码恢复到 develop" | |
| git diff develop --name-only -z -- | |
| # 只把「你改过的代码文件」恢复回来 | |
| git diff develop --name-only -z -- \ | |
| ':!*.json' ':!*.yml' ':!*.yaml' ':!*.env' ':!*.conf' ':!*.ini' ':!*.properties' \ | |
| | xargs -0 git checkout 你的分支名 -- | |
| git add . | |
| git commit -m "feat: 仅代码改动(对比de |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment