撤销已经推送到远程仓库的最后一次提交,要小心这么操作,因为远程仓库还有别人在使用 $ git reset --hard HEAD^ $ git push -f origin master 从仓库中提出一个文件夹作为单独的仓库 $ ls ORIG_REPO $ git clone ORIG_REPO NEW_REPO --no-hardlinks $ cd NEW_REPO $ git filter-branch --prune-empty --subdirectory-filter YOUR_F…