# PUB **Repository Path**: yuanyihan/PUB ## Basic Information - **Project Name**: PUB - **Description**: 公开 - **Primary Language**: Unknown - **License**: GPL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-03 - **Last Updated**: 2025-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ``` # 分支清理https://www.cnblogs.com/relucent/p/11635740.html # git init # git config --global user.name "袁一涵" # git config --global user.email "1226317595@qq.com" # 子模块用的代理 # git config --global http.https://github.com.proxy https://127.0.0.1:1080 # git config --global https.https://github.com.proxy https://127.0.0.1:1080 # git remote add gitee https://www.gitee.com/yuanyihan/PUB.git # git rm -r --cached . git add -A git commit -m "20220209" git push -u gitee master git pull gitee master git submodule update --remote === 子模块 # 参考:https://blog.csdn.net/guotianqing/article/details/82391665 git submodule add https://github.com/algorithmzuo/class-notes.git LeetCode/Z/algorithmzuo/ git submodule update --remote ``` ``` YYYYYYY YYYYYYYYYYYYYY YYYYYYYHHHHHHHHH HHHHHHHHH Y:::::Y Y:::::YY:::::Y Y:::::YH:::::::H H:::::::H Y:::::Y Y:::::YY:::::Y Y:::::YH:::::::H H:::::::H Y::::::Y Y::::::YY::::::Y Y::::::YHH::::::H H::::::HH YYY:::::Y Y:::::YYYYYY:::::Y Y:::::YYY H:::::H H:::::H Y:::::Y Y:::::Y Y:::::Y Y:::::Y H:::::H H:::::H Y:::::Y:::::Y Y:::::Y:::::Y H::::::HHHHH::::::H Y:::::::::Y Y:::::::::Y H:::::::::::::::::H Y:::::::Y Y:::::::Y H:::::::::::::::::H Y:::::Y Y:::::Y H::::::HHHHH::::::H Y:::::Y Y:::::Y H:::::H H:::::H Y:::::Y Y:::::Y H:::::H H:::::H Y:::::Y Y:::::Y HH::::::H H::::::HH YYYY:::::YYYY YYYY:::::YYYY H:::::::H H:::::::H Y:::::::::::Y Y:::::::::::Y H:::::::H H:::::::H YYYYYYYYYYYYY YYYYYYYYYYYYY HHHHHHHHH HHHHHHHHH ``` ``` # 清理历史 1.创建一个新的分支(孤儿分支) git checkout --orphan latest_branch 2.添加所有文件 git add -A 3.提交更改 git commit -am "commit" 4.删除需要替换的分支 git branch -D master 5.重命名创建的分支为删除的分支 git branch -m master 6.强制提交到远程仓库 git push -f gitee master docker: { "registry-mirrors": [ "https://dockerproxy.com", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com", "https://ccr.ccs.tencentyun.com" ] } ```