Skip to content

Who Is the Ghost User on Github?

Estimated reading time 3 min

This morning, I woke up to a storm of 200+ GitHub notifications. My inbox, usually pristine, was drowning in a deluge of spams.

As I scrolled through, my screen filled with an overwhelming array of spam discussions.

Screenshot of the GitHub interface showing a spam GitHub discussion with 'WATCH Kingdom of the Planet of the Apes FuLLMovie (.Free.)...' title, and a content matching this title, with big 'Watch now' and 'Download' buttons Screenshot of the GitHub interface showing a spam GitHub discussion with 'FREE-ROBUX-GENERATOR-2024-FREE-ROBUX-NEW-CODES-DAILY BONUS-[Jo)ztyr]' title, and a content matching this title, with links to get it

OK, cool, we are being productive today! 200+ GitHub discussions to delete!

We can’t see it in the screenshots, but there were several authors of the discussions, or answering to the discussions. I couldn’t block them for this specific repository as I am not the owner of the repository, but I could report them. So, one by one, I started to delete the discussions and report the users without looking at their profile.

The usual process happened on GitHub side, except for one user: ghost!

The GitHub Developer Support answered:

“The ghost username is in place to designate accounts that have been deleted by their owners, but that still have content that is visible across the GitHub platform.”

Oops!

Indeed, I didn’t check the GitHub profile of the user before reporting it, and it is pretty obvious when you are looking at it:

ghost Hi, I'm @ghost! I take the place of user accounts that have been deleted. 👻

The ghost user is a placeholder account used by GitHub to manage contributions and commits from users who have been deleted or whose accounts are no longer active. So it is not a spam account, and not especially an account to report. 😅

When a user is deleted from GitHub, their contributions, such as commits, issues, and comments, are not erased. Instead, these contributions are attributed to the Ghost user to maintain the integrity and history of the repository.

The Role of the Ghost User

The primary purpose of the ghost user is to preserve the history and context of projects.

It helps with maintaining repository integrity. When a user is deleted, removing their contributions would disrupt the continuity and understanding of the project. By attributing these contributions to the ghost user, GitHub ensures that the project’s history remains intact.

It also helps with contextual continuity. Comments on issues and pull requests often provide valuable insights and discussions. Reassigning these to the ghost user ensures that future contributors can still benefit from these historical discussions.

When Does the Ghost User Appear?

You might see the ghost user when a GitHub user decides to delete their account, all their contributions are transferred to the Ghost user.

It can also happen when GitHub removes an account due to policy violations or other reasons. In this case, the contributions are reassigned to the Ghost user.


In conclusion, the ghost user on GitHub is an essential mechanism to preserve the continuity and integrity of projects.

You can even follow it, it has already 9.5k followers! 😅