TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Hidden GitHub commits and how to reveal them

94 点作者 chuckhend大约 1 年前

6 条评论

Sohcahtoa82大约 1 年前
This highlights why it&#x27;s so important that any secret that gets committed <i>must</i> be rotated. Simply removing it from the git history isn&#x27;t enough, because it can still linger, it&#x27;s just harder to find.
评论 #39485191 未加载
评论 #39485805 未加载
评论 #39484143 未加载
semiquaver大约 1 年前
You don’t even need the pushes API to see commits that were force pushed away. You can get the head of any branch at a given time using `gitrevisions` [1] syntax any place that you would normally put a branch or commit.<p>e.g to see the state of the cpython main branch on January 1 we can ask for `main@{2024-01-01}`:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython&#x2F;tree&#x2F;main@{2024-01-01}">https:&#x2F;&#x2F;github.com&#x2F;python&#x2F;cpython&#x2F;tree&#x2F;main@{2024-01-01}</a><p>This does not walk the commit history, but instead the server-side reflog, so it’s immune to force pushing and can only be avoided by GC of the reflog or repo. Definitely contact GH support if you pushed something you shouldn’t have.<p>[1] <a href="https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;gitrevisions" rel="nofollow">https:&#x2F;&#x2F;git-scm.com&#x2F;docs&#x2F;gitrevisions</a>
评论 #39488679 未加载
Okx大约 1 年前
If you&#x27;ve inadvertently committed, say, copyrighted material to GitHub, and want to fully erase it, is there a way? Other than contacting GitHub as this article mentions.<p>Even if you contact them, GitHub says[1] that they will not remove &quot;non-sensitive data&quot;, but makes no reference to copyrighted material.<p>[1] <a href="https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;authentication&#x2F;keeping-your-account-and-data-secure&#x2F;removing-sensitive-data-from-a-repository#fully-removing-the-data-from-github" rel="nofollow">https:&#x2F;&#x2F;docs.github.com&#x2F;en&#x2F;authentication&#x2F;keeping-your-accou...</a>
评论 #39486577 未加载
评论 #39489915 未加载
评论 #39486041 未加载
funyug大约 1 年前
Is this an issue with git or github only? If this is an issue with github only, i won&#x27;t use it anymore for personal projects
评论 #39485600 未加载
评论 #39485345 未加载
评论 #39488379 未加载
silverwind大约 1 年前
These commits can be deleted via `git gc`. Which part if GitHub&#x27;s &quot;architecture&quot; prevents them from running that?
or113大约 1 年前
someone knows if tools like truffle hog scans these?