TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hidden GitHub commits and how to reveal them

94 pointsby chuckhendabout 1 year ago

6 comments

Sohcahtoa82about 1 year ago
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 未加载
semiquaverabout 1 year ago
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 未加载
Okxabout 1 year ago
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 未加载
funyugabout 1 year ago
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 未加载
silverwindabout 1 year ago
These commits can be deleted via `git gc`. Which part if GitHub&#x27;s &quot;architecture&quot; prevents them from running that?
or113about 1 year ago
someone knows if tools like truffle hog scans these?