把图像从远程存储库,而不是开发人员存储库 - Remove images from remote repository, but not developer repositories

- 此内容更新于:2016-02-03
主题:

我一个项目上工作,我的客户正在加载数据服务器和每次我把服务器上的变化,我得到所有的新图像。我现在的回购是3.3gb大,难以管理。我已经添加了图片文件夹我的地方。gitignore,但如何从GIT存储库中删除文件夹的图像使其20mb,而不是3.3gb没有把图像从任何开发人员的电脑吗?谢谢你们!

原文:

I'm working on a project where my client is loading data on the server and every time I pull the server changes, I get all the new images.

My repo is now 3.3gb large, which is unmanageable. I've added the images folder to my local .gitignore, but how to I remove the images folder from the GIT repo to make it 20mb instead of 3.3gb without removing the images from any of the developers computers?

Thank you!

楼主:定义“回购”当你使用它。Git是分布式的,这意味着到处都在使用回购。

(原文:Define "repo" as you use it here. Git is distributed, which means that everywhere it's in use is a repo.)

网友:在Bitbucket都

(原文:Within Bitbucket)

解决方案:
我猜你想删除图片,一直致力于创建(或存在)的远程存储库。因为你已经添加了目录。gitignore,您可以安全地删除图像从任何电脑上,电脑就不会影响其他人。在这种情况下,登录到远程服务器和删除后的文件更新它。gitignore文件,要么拉或手动更改。在BitBucket都直接删除文件,遵循本指南。我去了远程存储库的网站>>>来源选择分支选择要删除文件夹>选择文件>编辑>删除>提交。
原文:

My guess is that you'd like to remove images that have been committed to (or existed upon creation of) a remote repository. Since you've added the directory to .gitignore, you can safely remove images from any computer and it won't affect others.

In this case, log into the remote server and delete the files after updating its .gitignore file, either with a pull or manual change.

To delete files directly on BitBucket, follow this guide.

I went to the remote repository's website > Source > select branch > select folder > select file to be deleted > Edit > Delete > Commit.

网友:谢谢你的详细的回复!既然我有。gitignore已经忽略了图像文件夹,我可以删除图片Bitbucket都没有失去的图像吗?

(原文:Thank you for the detailed response! So since I have .gitignore already ignoring the images folder, I can just delete the images from Bitbucket without losing the images?)

楼主:应该是这样的。如果它显示了文件删除后提交,然后是错误的。

(原文:That should be the case. If it shows files staged for commit after deleting, then something is wrong.)