Git repository indexing fails because it cannot delete the branch which you are currently on

Still need help?

The Atlassian Community is here for you.

Ask the community


The following appears in the atlassian-fisheye.log:

2013-04-04 17:14:08,986 ERROR - Error removing local branch: [error: Cannot delete the branch 'the_branch_name' which you are currently on.]
com.atlassian.utils.process.ProcessException: While executing: "git branch -D the_branch_name " in [/opt/fisheye/FISHEYE_INST/var/cache/REPO_NAME/clone]
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(
at com.atlassian.fisheye.git.GitScanner.removeLocalBranch(
at com.atlassian.fisheye.git.GitScanner.fetchLatest(
at com.atlassian.fisheye.dvcs.DvcsScanner.updateClone(
at com.atlassian.fisheye.dvcs.DvcsScanner.updateLocalRepoCache(
at com.cenqua.fisheye.rep.BaseRepositoryEngine.doSlurp(
at com.cenqua.fisheye.rep.RepositoryEngine.slurp(
at com.cenqua.fisheye.rep.RepositoryHandle.processPingRequests(
at com.cenqua.fisheye.rep.RepositoryHandle.access$100(
at com.cenqua.fisheye.rep.RepositoryHandle$
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: com.atlassian.utils.process.ProcessException: Non-zero exit code: 1
at com.atlassian.utils.process.PluggableProcessHandler.complete(
at com.atlassian.utils.process.ExternalProcessImpl.finish(
at com.atlassian.utils.process.ExternalProcessImpl.execute(
at com.atlassian.fisheye.dvcs.client.DvcsContext.executeCommand(


Fisheye is not aware of some commits that have been deleted from one of the repositories. The repository can be identified from the path in the error message, for example in the above stacktrace, the repository is REPO_NAME.


A re-clone and re-index of the repository is required. This can be done by performing the following:

  1. Navigate to Administration >> Repository Settings >> Repositories
  2. Select the repository that is affected to bring up the repository Summary Page
  3. Select Maintenance on the left.
  4. Next to Re-clone and Re-index, click on the Start button

This will have Fisheye to re-index all contents related to that repository.

(info) Depending on the size of the repository it may take a lot of time so it is recommended to perform this outside of business hours.

Last modified on Jul 31, 2018

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.