Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

删除的文件仍然可以看到 #5

Open
QuantumGhost opened this issue Apr 21, 2020 · 1 comment
Open

删除的文件仍然可以看到 #5

QuantumGhost opened this issue Apr 21, 2020 · 1 comment

Comments

@QuantumGhost
Copy link

QuantumGhost commented Apr 21, 2020

由于 Git 的原理,被删除的文章并不会从历史中被移除,其他人仍然可以从 diff 或者老版本中看到被删除的文章的内容:

  • 例子1 点击 load diff 就可以看到被删除的文章了。
  • 例子2 回退到 d6be185 这个版本也可以看到被删除的文章
@333mhz
Copy link

333mhz commented May 6, 2020

由于 Git 的原理,被删除的文章并不会从历史中被移除,其他人仍然可以从 diff 或者老版本中看到被删除的文章的内容:

  • 例子1 点击 load diff 就可以看到被删除的文章了。
  • 例子2 回退到 d6be185 这个版本也可以看到被删除的文章

这样挺好的。。。很多老文章我还想翻出来看呢。
作者如果有需要确切的删除那些内容,有两个方法。
1.根据需要保留的内容完全重建仓库。
2.squash合并掉中间的内容,之后force push覆盖掉中间那些commit,这样外边基本就看不到了。
(但能通过reflog找回来。)

ex:推荐一款优秀的GUI工具支持WIN和MAC可以很方便进行图形化裁剪分支的操作,https://www.git-fork.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants