我可以清空远程git存储库吗? [英] can I empty a remote git repository?

查看:101
本文介绍了我可以清空远程git存储库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了新的远程git仓库,并且已经推出了一些内容 - 首先测试推送,然后从本地推送真正的代码。我希望从头开始,以便创建少量分支(master =准备为开发者发布代码,测试分支和分支机构),并为每个用户授予不同的权限。

I created new remote git repository and already pushed something in there - first test push and then real code push from local. I want to start from scratch so I can creat few branches (master = ready to release code, test branch and branches for developers) and give them different permissions per user.

我可以清空现有的远程存储库吗?这是一个远程git仓库,它位于linux和developer上,我运行windows box。

Can I empty the existing remote repository somehow? It's a remote git repository that sits on linux and developer and I run windows box.

推荐答案

把它拿开!删除整个包含的目录,然后根据需要重新创建它。

If you want the repo gone, just take it away! Delete the whole containing directory, and recreate it as you see fit.

是的,您也可以在您的目标上创建一个新的回购站,然后强制推送到远程,并远程删除所有的裁判,然后确保 git gc 得到运行......但这需要时间和精力。把它擦掉。

Yes, you could also make a new repo just on your end, and force push to the remote, and remotely delete all the refs, and then make sure git gc gets run on it... but that takes time and effort. Just wipe it out.

这篇关于我可以清空远程git存储库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆