Menu

Why Git Shows Old Commit URLs After Squashing History
📰

Why Git Shows Old Commit URLs After Squashing History

DEV Community: opensource·orca forge·2 days ago
#zJlrGXnS
#devtoopensource#devto#dev#repository#commit
Reading 0:00
15s threshold

📝 Originally published (in Japanese) at forge.workstyle.tech .

TL;DR I was preparing to release Voice Canvas as OSS and found that an old commit URL still opened in my account after I squashed the Git history into 1 commit. The repository was private, and the same URL returned 404 when I was logged out. Since that did not confirm what would happen after publication, I recreated the repository before making it public.

Conclusion First

Even after squashing a Git history into a single commit, I could open an old commit URL while logged in to my account on a private repository. I recreated the repository with the same name and made it public, then confirmed that the old URL could not be opened while logged out. I did not test whether the old commit would be visible after making the repository public.

Why an Old URL Still Opened After I Squashed the History

I squashed Voice Canvas’s history into a single commit because it contained information I didn’t want to leave in the old history.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.