Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Getting error with git: fatal: reference is not a tree

Fernando Cosa July 25, 2018

Hi,

We have been creating branches for a long time now (1 year or so) using the Bitbucket web site. After this I would do a git fetch using Git Bash (tortoise) which will identify that there is a new branch and after that I can do a git checkout mybranch

All of a sudden, I create new branches (done this twice now), I do a git fetch which identifies that there is a new branch, but when I do get checkout mybranch I get

fatal: reference is not a tree: mybranch

Additionally when I do git branch, the new branch is not actually listed.

Our bamboo server is also throwing the same error so we are unable to run the build.

If I use Source Tree the branch is downloaded properly but, it is no use as Bamboo doesn't use Source Tree.

I have seen other people on the internet having same error but none of the issues seem related to what I am experiencing.

Any ideas or clues on how to proceed?

2 answers

0 votes

Hello. I met same problem.

Atlassian Bamboo version 7.2.2 build 70209 - 22 Jan 21

I run plan for custom revision. I got error in pipeline and when try to restart incomplete job, got same error. Create new pipeline for this revision? resolved this problem. Probably it's some bag.

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 27, 2018

Hi Fernando, have you tried the command line?

You said that when you use Sourcetree it works, so I wonder if it's something related to Tortoise. 

Have you seen this Checkout failed reference is not a tree? Does that help you?

Let us know!

Ana

Fernando Cosa July 27, 2018

Hi Ana,

Yes I always use the command line git bash, I only use Sourcetree to look at code differences. That is were I found out that I could checkout the branch with sourcetree.

I did look at the link you sent but I couldn't find a relation to what is happening. Our webhooks have not changed and are not any of the ones listed on that link (if I am understanding that properly).

I got it to partially work now. I checked in a "dummy" change against master and now all new branches can be checked out normally using the command line. Having said this, for the two old branches that had issues I am still unable to check them out (so is bamboo). So to move forward I have decided to ignore those two branches. It is a pity thought that I don't know what the actual problem is.

Thanks for your response

Fernando

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events