Search code examples
gitgitkraken

Stage and Commit fails in Git Kraken because 'cannot read property 'getTree'


I am facing the following error in Git Kraken, with a repo that I was working without problems until now. I can see the list with file changes at the right, but when I select one file, this error is shown. No project tree is displayed at the left, so the other suggestions that I can find doesn't work for me unfortunately.

enter image description here


Solution

  • I had this same problem and it was because even though the git files were there, there was no initial commit.

    I fixed it by manually making a first commit in the console, then opening the repo in gitkraken.

    git add .gitignore
    git commit -m "first commit"