Error encountered on Source Tree - git log failed with code 128

When I clone a Git repo in Source Tree and make a commit and then go to Master branch to try and push my code to Bit Bucket, I get this error:

'git log' failed with code 128:'fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions

Please see screen shot:
https://dl.dropbox.com/u/119654/Support/Atlassian/Screen%20Shot%202012-10-09%20at%2016.39.03.png

This has been happening recently whenever I create a new repo and then initiate first commit. Seems to throw this error everytime. I'm not sure why as I haven't changed anything.

Currently running Mac 10.7.5 and Source Tree 1.5.4. and have Git 1.7.5.4 on my Mac.

8 answers

1 accepted

Hmm, that's odd - it looks like something has happened to the definition of the remote branch 'origin/master'.

Can you try this:

  • Click 'Fetch' on the toolbar
  • Leave 'Fetch from all remotes' checked
  • Check 'Prune tracking branches no longer present on remote(s)'
  • Click OK

Thanks that fixed it. Not sure why that happened in the first place

This kind of thing usually only happens if someone deletes branches from the remote, or forces a push which changes commits that someone else has pulled. Beause git fetches this from the remote and stores it, if it changes it can get confused unless you prune the remote info like this. You shouldn't need to do it normally.

Strange because, I only just created this new repo and no one else is working on it. I did the first commit and then it came up with that problem. There wasn't any remote branches setup

I still see this problem, I wasn't able to fix this by tip given by @Steve. Please suggest a workaround for this.

Hello, I still receive the error 128.

I fixed by removing from bookmarks, opening the repo from File -> Open, and saving to bookmarks again.

This helped me. Thanks.

I am getting this issue, I'm using git flow and just finished with a feature branch, merged it into develop, removed my old feature branch and now get that error message everytime I change branch or load up the window with the graph it errors.

This is happening everytime a delete a branch, even if I don't push it to a remote.

Your upstream is gone.

Try this:

git branch --unset-upstream

thanks - this fixed the issue

I still this problem, I wasn't able to fix this by tip given by @Steve. Please suggest a workaround for this.

I tried the Fetch thingy and also$ git branch --unset-upstream, but same error 128.

0 vote

None of this worked for me... any ideas?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

151 views 6 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you