Git Troubleshooting

Git Configuration

Can't Find Git Repository

Current directory ({current_directory}) is not a git repository.

The current directory is not a git repository, please make sure you run the verify command inside your git repository.

Commit is Invalid

{commit} is not a valid commit

Please make sure the checked-out commit is a valid commit in your git history

Can't Find Commit

Can't find commit {commit} - Make sure it exists in the repository

Please make sure the checked-out commit is a valid commit in your git history

Commit is Shallow

Commit {commit} is shallow - Make sure the commit's branch has sufficient history

For Redefine to perform test prediction, it needs to perform git operations that require sufficient git history. If your commit is shallow (depth=1) or doesn't have sufficient depth (<100) redefine will not be able to perform quality test prediction.

To fix the issue, please make sure git clone is not shallow. if --depth is used, it has to be >100"

Can't Get Commit Depth

Can't get depth of commit {commit} - Make sure it exists in the repository

For Redefine to perform test prediction, it needs to perform git operations that require sufficient git history. If your commit is shallow (depth=1) or doesn't have sufficient depth (<100) redefine will not be able to perform quality test prediction.

To fix the issue, please make sure git clone is not shallow. if --depth is used, it has to be >100"

Can't Find Remote Branches

Can't find remote branches for repository {git_repo} - Make sure the repository is valid and has remote

Please make sure your current machine has permission to the remote repository, and you can fetch the remote repository.

Can't Fetch Branch

Branch {branch} is {missing/shallow}, failed fetch - Make sure the branch has sufficient history

Please make sure your current machine has sufficient credentials to the remote repository, and you can fetch the remote branch.

To test for sufficient credentials, run git fetch {remote} {branch}:{branch} from the CI machine, for example git fetch origin main:main

Stable Branch Missing

Stable branch {branch} is missing - Make sure it exists in the repository

Please make sure your current machine has permission to the remote repository, and you can fetch the configured stable branch

Problem Fetching Stable Branch

Stable branch {branch} is {missing/shallow}, failed fetch - Make sure the branch has sufficient history

Please make sure your current machine has permission to the remote repository, and you can fetch the configured stable branch.

Stable Branch Depth Problem

Can't get depth of stable branch - Make sure it exists in the repository

Please make sure your current machine has permission to the remote repository, and the configured stable branch exists.

No Merge Base Found

No merge base found between any {source} and {stable_branch_str} - Make sure the branches have a common ancestor

For Redefine to perform test prediction, it needs to perform git operations based on the changes you've performed in your branch. If no merge base is found between your branch and the stable branch, that could be due to the following:

  • Your branch hasn't originated from the stable branch (Ex. Branched out of main when the stable is defined to develop)

  • Your branch is too far from the stable branch - Currently, redefine supports a depth range of up to 100. This is usually due to running redefine on a separate long-running branch without adapting the stable branch configuration (i.e, running redefine on dev itself when a stable branch is configured for main)

Multiple Stable Branches Defined

More than one stable branch specified in config - Please specify only one by running Redefine config set stable_branch=<branch_name>"

Redefine does not support multiple stable branches, please make sure you have only 1 configured stable branch

Multiple Remote Origins

More than one remote found

Redefine uses the git remote to verify that it performs git operations on the latest version of a branch. By having more than one git remote, redefine will not be able to determine which remote to work with. Please contact us at support@redefine.dev for solutions.

Git Remote Name Invalid

Git remote name is invalid

Please make sure your git remote is valid.

Unable to Find Remote

Unable to find remote

Redefine was unable to find a configured git remote, please make sure you have a valid configured git remote (see https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)

Last updated