Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete commits from jira issue after git prune or git gc (garbage collection) ?

Stefan Salzl
Community Champion
June 9, 2026

Hi Atlassians,

I´ve got a problem at customer´s site:

The setting is a Jira DC deployment with GitHub Enterprise (self hosted) connected via DVSC.

After deleting commits in GitHub

github-env bin/rake git:gc:all

 

the commits from the garbage collection still showing in Jira issue´s development information but not working anymore (dead link - opening the link leads to 404)

 

Is there any way to syncronize garbage collection or the git:gc /git prune ?

 

Thanks in advance

Best
Stefan

2 answers

0 votes
Yashodip Jadhav
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
June 10, 2026

 

Hi @Stefan Salzl  

Interesting question. From what I know, Jira DC stores development information that it receives from the DVCS integration, and running git gc or git prune on the GitHub side doesn't always trigger a cleanup in Jira. That's why you may still see the commit reference even though the underlying object no longer exists, resulting in a 404.

In case it's helpful, you could try forcing a resynchronization of the DVCS connection or reindexing the development information to see if the stale metadata is refreshed. I'm also curious if anyone has found a supported way to purge these orphaned commit links.

Best Regards,
Yashodip Jadhav.

0 votes
Aron Gombas _Midori_
Community Champion
June 10, 2026

@Stefan Salzl 

The DVCS connector in Jira Data Center does not automatically detect references to commits that have been removed on the GitHub side. The sync process is additive: it picks up new commits but does not verify whether previously indexed commits still exist in the remote repository.

Here are your options, from least to most disruptive:

1. Try a full soft sync first. Go to Jira Administration > Applications > DVCS Accounts, find the relevant GitHub Enterprise account, and click the sync icon. This is unlikely to remove stale commits but is worth trying as a first step.

2. Remove and re-add the repository (or the entire DVCS organization). This is the most reliable approach. Go to Jira Administration > Applications > DVCS Accounts, remove the connected GitHub Enterprise organization or specific repository, then re-add it. Jira will re-index all development information from scratch based on what currently exists in GitHub, so the garbage-collected commits will no longer appear.

Note that the re-sync can take significant time. Also, before removing the DVCS account, document the old configuration (OAuth credentials, repository list, etc.).

Suggest an answer

Log in or Sign up to answer