需求:将A仓库的部分内容摘到B仓库中 步骤: 在A仓库的本地添加一个B仓库的远程连接:git remote add B 链接地址;删除多余文件,保留B仓库需要的文件;git add -A;git commit -m ‘update’;git push B master -f;回退上一个commit版本:git reset --hard xxx;