57

Every time I open gitkrarken it gets stuck at opening repo icon. I can't open/clone/init repo. I heard some others have the same problem but no one seems to know why this is happening and what the solution is. Can anyone help with this?

UPDATE 1 Reinstalled it. Still having the same problem

Soli
  • 842
  • 2
  • 11
  • 24
  • I have the same trouble with newest version GitKraken (3/6/6) and cant find any solutions to resolve - methods below cant help – Smoggit Jul 19 '18 at 07:23

30 Answers30

44

A possible solution for resolving this issue with GitKraken is to delete the hidden folder .gitkraken located in your home directory (macOS/Linux) or the %APPDATA% directory (Windows). Keep in mind that this action will reset all of your GitKraken settings and preferences.

For macOS and Linux users:

  1. Close GitKraken.
  2. Open Terminal.
  3. Execute the following command to delete the folder:
    rm -rf ~/.gitkraken
    
  4. Restart GitKraken.

For Windows users:

  1. Close GitKraken.
  2. Press Win + R to open the Run dialog box.
  3. Type %APPDATA% and press Enter. This should open the C:\\Users\\%USERNAME%\\AppData\\Roaming folder.
  4. Locate and delete the .gitkraken folder.
  5. Restart GitKraken.
yoeunes
  • 2,927
  • 2
  • 15
  • 26
  • 11
    Not seeing this _.gitkraken_ folder in the home folder. I am on a Windows machine though and this folder is located in _%APPDATA%_ (namely _C:\Users\%USERNAME%\AppData\Roaming_). Deleted the folder, but sadly, didn't fix my problem. – AhmedBM Jul 19 '17 at 18:47
  • the combination of this, emptying the recycle bin and opening it with visual studio closed solved my problem ....for now. :-) – Dan Csharpster Aug 18 '17 at 11:48
  • 9
    Although this works, it resets everything. Repos disappear, logins, preferences and settings. Not an ideal solution. – Nate Ritter Mar 01 '18 at 21:36
  • 2
    It worked for me as well. Removing /AppData/Roaming/.gitkraken has done it. Bad part is, all the configuration is gone, but that's not so bad. – Rafa Gomez Jul 09 '18 at 18:40
  • 1
    This should be the chosen answer, but it seems like the fix wouldnt be too complicated for the devs anmd its beena problem for awhile now – Cacoon Aug 07 '18 at 22:34
  • 1
    I solved it by deleting the /AppData/Roaming/Cache folder content, no repos/configurations lost! – Nahue Nov 07 '18 at 17:10
  • 5
    `rm -r ~/.gitkraken ` because `rm: cannot remove '/home/reigin/.gitkraken': Is a directory` hopes this help other linux user.. – Budi Mulyo Mar 08 '19 at 01:40
  • 2
    For me removing the local repo was the solution. Just a new clone from the server solved it. – DreeOlee May 24 '19 at 08:50
  • 1
    This worked like a charm, thanks. I guess the issue is with the gitkarken itself. – Gaurav Rai Jun 27 '19 at 13:32
  • 1
    For me the problem was that the last opened directory was removed. I solved it removing .gitkraken directory, but I think it would have been enough just modifying the file .gitkraken/config changing the value of field lastOpened. Then I wouldn't have lost the rest of gitkraken configuration. – Egl Oct 15 '19 at 14:16
  • 1
    for me it's cure the symptoms, not the disease. because `rm -r ~/.gitkraken` after then reopen same repo still drop in stuck at opening repo (Ver 7.7.2) I solved my problem by delete the incomplete repo then re-clone. but don't forget to the `Preferences` to assign the ssh key. – Joshpy Sep 09 '21 at 06:55
  • This is not an ideal solution as many have stated and in some cases is not even a solution. You should mention in your answer what exactly happens after running this command since it'll reset GitKraken entirely. For someone that has multiple accounts and tons of repos this is a terrible solution. – Alejandro Cotilla Nov 17 '22 at 13:10
24

I just had a similar (maybe the same) problem with GitKraken V2.7.0 x64 on Windows. GitKraken crashed and tried to open the repo after that. This never finished. I assume this is caused by visual studio which was open at the time and VS and GitKraken are not exactly friends. I killed GitKraken, closed VS. After that, when opening the repo in GitKraken, it said something like "there is no repo, do you want to initialize it?". This also failed. Not sure what the root cause for the problem is.

The solution however was to checkout another branch from the CLI. After that GitKraken magically worked again. Maybe this helps someone.

ChrisM
  • 1,148
  • 8
  • 22
16

Not a proper solution, but I'm having the same problem. I've been able to work around it by closing down Visual Studio before opening GitKraken. It only gets stuck when opening and VS is already open.

GeekyMonkey
  • 12,478
  • 6
  • 33
  • 39
  • 3
    I am not using VS! – Soli Apr 06 '17 at 14:49
  • 2
    Try shutting down other apps that may have a file lock. I'm not saying this is a solution, but you'll get more info about where the problem is. – GeekyMonkey Apr 09 '17 at 10:40
  • 2
    We are having same issue on all installs, some users without VS some with on different repo's. Common setting is that we are using BitBucket as remote hosted repo. – DoodleWalker May 23 '17 at 09:40
  • 1
    Not using VS either, but closing Atom (which had the same project open) got GitKraken unstuck instantly. – Iceable Feb 23 '18 at 14:06
14

*GitKraken 7.7.1 has resolved this issue, see below if issue persists.

Had this issue popup with GitKraken 7.7.0 today. Never had anything in the application error logs or the repo logs that seemed to point to a specific cause or source, but I've resolved the issue today and before (without losing any configuration settings) by:

Going to ->

AppData\Roaming\.gitkraken\profiles\[your profile]\profile

or

~/.gitkraken/profiles/[your profile]/profile

BACKUP this profile file or have it open in text editor able to undo changes.

Open 'profile' in text editor and remove the problematic repo entries under tabInfo -> tabs ->

{
  "tabInfo": {
    "tabs": [
      { <--- DELETE
        "id": "", <--- DELETE
        "type": "", <--- DELETE
        "repoName": "", <--- DELETE
        "repoPath": "" <--- DELETE
      }, <--- DELETE
    ],
    "selectedTabId": ""
  }
}

Whenever I do this and reopen the problematic repo in GitKraken, it resolves the endless loading issue.

OR

As per Borhan Kazimipour's answer, and based on feedback from GitKraken Support, a simple git gc on the repo directory can resolve the issue.

BagoDev
  • 313
  • 6
  • 12
9

Currently for a workaround I do View->Reload (Ctrl + R).

BizzyDizzy
  • 279
  • 1
  • 4
  • 9
8

I manually removed all files had [conflict] in their names from .git folder and its subfolders. Then, I performed a git gc to compress the database and finally git fsck to make sure everything is just fine. Now, I can open the repo in GitKraken.

Notes:

  1. This might be helpful to remove all files marked as '[conflict]'.
  2. The combination worked for me but you may not need to perform all these steps. For example, you may not have conflict files, or you just want to resolve them differently rather than removing them.
Borhan Kazimipour
  • 405
  • 1
  • 6
  • 13
7

Deleting the index.lock in my Project/.git folder worked for me. Btw it's a hidden folder.

Ivica Škrobo
  • 71
  • 1
  • 2
  • 1
    OMG thanks! Git Krakken used to be good now its doing this kind of stuff may need to switch. Might have been this coupled with the above solutions that got it working for me, but deleting index file certainly did the trick. – Nonlin Apr 16 '18 at 20:56
5

Fixed mine by

  1. Quit GitKraken
  2. Open terminal/command prompt and do a git status on the repo
  3. Found that there were a few files/folders uncommited/unstaged:

    1. A symlink pointing to a folder outside of my repo was renamed
    2. A copy of my repo inside the same repo
    3. A new folder with images
  4. Renamed #1 back to its original name, and removed #2 & #3 manually

  5. Opened gitkraken and it was able to load my repo without any problems
James Dizon
  • 71
  • 1
  • 2
4

To me the problem was that the git database was not compacted. git gui showed that notification (enter link description here). By compacting it (through git gui or git gc, I assume) it fixed the problem with GitKraken.

Pau Guillamon
  • 618
  • 5
  • 17
4

For us, it was the fact that the one of our guys had the repo cloned to a OneDrive folder.

When the repo was in a OneDrive folder GitKraken would open and then constantly refresh so you couldn't click or do anything. You could describe it as GitKracken looked like it was 'flashing' on screen.

As soon as we moved the repo to a folder not monitored by OneDrive it worked just fine.

Douglas Anderson
  • 4,652
  • 10
  • 40
  • 49
  • A little more detail might be helpful to others. What, exactly, about being in a OneDrive folder caused troubles? – Karl Wilbur Apr 15 '18 at 00:07
  • Onedrive folders have the ability to have online and offline files. Going in Parameters-> Parameters tab -> "On demand files" and unchecking the box made it work. This option seems to have come with a recent onedrive update. – V. Brunelle May 02 '18 at 15:46
3

In my case, the issue was with a .jfm (binary) file that my SSDT (Sql Server Data Tools) project generates. When that file changes, GK starts having this issue. If I manually commit (or revert) that file, the problem goes away.

Community
  • 1
  • 1
  • Adding jfm files to the gitignore will solve the problem, since GK won't try to figure out what changed with the file. – jstill Nov 28 '17 at 20:33
3

For me hanging GitKraken, if i delete branches in local or origin place. After this start hanging in main window or changes lister in right. Little help is if you run "GIT GC" (https://git-scm.com/docs/git-gc)

rombow
  • 209
  • 4
  • 6
3

By now, I'm sure this answer won't help who asked the question, but maybe this will help people in the future. I just simply deleted and re-cloned the repo that GitKraken was trying to open. Worked like a charm for me.

  • 1
    Did the same, only option that worked! However it seemed like I also had problems with some *git loose objects*, and I think this is what made GitKraken crash, because there's no reason that deleting the `.gitkraken` folder wouldn't be enough to solve the pb. – avazula Mar 28 '18 at 09:26
3

I was helping a friend with the same issue. He was using gitkraken with IntelliJ on a windows 10 VM. The solution that worked for us was: *Deleting the hidden .git folder, in the folder where you have whatever program your working on (the reason why is because gitkraken is trying to open the repo which is why it keeps popping up with the error) Afterward gitkraken should not have the error anymore because you deleted the repo. Now just clone the repo from GitHub and just place the newly cloned repo in the same place the old repo was.* Side note: if you try to open the repo from the recent tab in the open repo you will more likely to get an error saying something about not finding it. (its because that's the old repo you deleted) you will have to browse and open the newly cloned repo manually in order to make it work.

2

just had a similar problem with a spring-boot(mvc) project w/ embedded H2 db, on GitKraken(2.7.1)

Turns out when the app is running, it will cause this problem on selective hardware that use that repo, So make sure your repo isn't being actively used while sync-ing

matt antos
  • 21
  • 2
2

In our case there was a Latex document in the repository. Gitkraken could not open the repository.

Based on what @GeekyMonkey suggested, my student tried to start GitKraken after closing all files and shutting down his Tex editor.

It worked after that

2

I just had the same problem. I found that my .git/logs/HEAD had a bad entry (don't know how that happened nor why gitg and the git CLI both ignored the issue). Totally a problem with my repo, not GitKraken.

More detail...

To figure this out, I cloned the repo into a separate directory and meld'd them to see what was different. I opened GitKraken to this new clone; all's well. I then started copying things over from the old repo directory to the new one (objects, refs, logs, etc.). Once I copied that log file over, GitKraken went back to the "Opening repo" message.

Digging deeper into that log file I found a bad line. I was able to determine from the context how to re-create that bad line. Once I fixed it, GitKraken was happy.

Karl Wilbur
  • 5,898
  • 3
  • 44
  • 54
2

On Windows I solved with the following:

  1. rename the directory of the repo that is not opening
  2. open git kraken and close all tabs
  3. rename directory back to original name
  4. open the repo

Hope that helps other windows users :)

1

In my case, such GitKraken glitch is reproducing stably, when I make an attempt to attach some Dokku (https://github.com/dokku/dokku) remote repository with git remote add. Removing it fixes the issue. I think Heroku repos may cause the same issue, though never checked it.

UPD: It is not Dokku/Heroku which causing troubles in my case. Any time when I use SSH-like URL for any remote repository (like git@github.com:reponame...), I get cyclic reloading of GitKraken. By coincidence, Dokku and Heroku use SSH-like URLs by default. Once SSH-like URLs are removed or changed to HTTPS, GitKraken is ok.

skapral
  • 1,128
  • 9
  • 26
1

I had the same issue and couldnt fix it until I deleted the repo I knew was causing the issue and then created it again.

Working fine now

Ger Mc
  • 630
  • 3
  • 11
  • 22
1

I had the same problem. Reading all of the above it appeared that my workflow was incorrect. I opened Excel and Notepad++ and suchlike to make changes to the repo and then opened GitKarken and was faced with the spinning circle. Of course all of these other programs took locks on the files. As soon as I closed all of the other programs and the restarted GitKraken it worked!! So more correct workflow would be to open GitKraken first and let it connect everything together, then do some work. Commit was no problem after that.

1

In my case, I found out the problem was caused by the index file in ".git" folder.

The index is a binary file (generally kept in .git/index) containing a sorted list of path names, each with permissions and the SHA1 of a blob object; git ls-files can show you the contents of the index.

(Enter the link to know more)

Accidentally, I had deleted some files in my repository that's why it caused the index file changed. Therefore, my Gitkraken stuck in the infinity loop.

I just copied the index file in the previous updated repository and paste to the current repository. It works for me.

Nate Lai
  • 11
  • 2
1

I had this problem using one repo, but not on others. The problem child was fairly large and complicated. I tried many of the solutions here to no avail. Then, I tried a pretty obvious patch - and upgraded the software. I went from GitKraken v3.x to v4.x and that did it!

BuvinJ
  • 10,221
  • 5
  • 83
  • 96
1

TLDR;

brew install git-sizer
brew install bfg
bfg --strip-blobs-bigger-than 1M
git reflog expire --expire=now --all && git gc --prune=now --aggressive

I suddenly experienced this yesterday. I tried everything outlined here, and elsewhere. Nothing had any positive affect at all. What it turned out being for me was a repo that was large and complex...and, gc clean wasn't fixing it sufficiently. What I ended up doing was installing git-sizer (via homebrew), this alerted me to a couple issues. I then installed bfg (via homebrew) and then ran:

bfg --strip-blobs-bigger-than 1M

This executes a bunch of git commands and outlines large files in your repo (HEAD is excluded). This alerted me to, and removed, 6-8 large files that were committed long ago and have been lingering and bloating my repo ever since.

Following that I ran:

git reflog expire --expire=now --all && git gc --prune=now --aggressive

That significantly reduced my repo size, removed a bunch of bloat, cleaned things up...and Gitkraken immediately opened my repo. Back in action.

Also, Gitkraken offers some support idea (I think you have to be logged in to your account to view). Their docs illustrate how to view error logs, performance issues, and outlines some common issues and settings to check.

hellion
  • 4,602
  • 6
  • 38
  • 77
  • Just the `git reflog expire --expire=now --all && git gc --prune=now --aggressive` worked for me. Thanks! – n3wbsauce Aug 09 '21 at 13:27
0

Check your project for large generated directories, like node_modules, which git isn't configured to ignore. If you don't tell git to ignore those (often very large) directories, Kraken will try to index them and will become overwhelmed by the task.

I had this problem too. Once I added the "node_modules" dir to the .gitignore file,

echo node_modules >> .gitignore

and restarted the Kraken client, it worked like a charm.

Daniel Quinlan
  • 2,639
  • 1
  • 20
  • 23
0

I know this is an older thread but I had this issue today. It was caused by having a large number of files added to my repo without adding them to the .gitignore. I threw the COCO dataset into a deep learning repo so git was trying to list all 100k or so images, causing the crash. I just added the COCO directory to the .gitignore and everything went back to working like normal.

Pype
  • 75
  • 2
  • 8
0

If it's only one specific repo, make sure you don't have huge files in your repo. Adding them (or the respective folder) to the .gitignore should resolve the issue.

mattseibl
  • 41
  • 3
0

I fixed mine by:

  • Close gitkraken and quit if u r ios
  • Make sure you add large folders to .gitignore i.e. node_modules and Pod folders. i.e. open .gitignore file in vs code and add: node_modules/
    /ios/Pods/
  • in vs code click on source control on left side menu and commit your changes by adding message and click on check, then close vs code
  • open gitkraken and it should work fine now
Ahmed Shahin
  • 102
  • 4
0

I've got another solution. In my case, I was sure it was a specific opened repo that was causing the issue.

For Mac:

  1. Open ~/.gitkraken/profiles/profile (you can use your text editor);

  2. Inside tabInfo object, there is an attribute selectedTabId that displays the current opened tab;

  3. You can see right below the IDs of all tabs you've got; just pick another different ID from the list below and put its value on the selectedTabId;

  4. Restart GitKraken client. If the problem was with the repo, Gitkraken should open correctly;

  5. Close the broken repo using the right button (without left clicking/going to it);

  6. Open/import the repo again.

For me, it took a little while but worked just fine again.

Hope it helps. :)

Анна
  • 1,248
  • 15
  • 26
0

In my case, somehow my repo had become...shallow. As in, there was a file called .git/shallow in my repo. I don't know what got run, or how that happened, but it happened.

So I just ran:

git fetch --unshallow

...a couple of files got pulled down. Now Gitkraken opens it like a champ.

(Note that my other git GUI, Tower, didn't have an issue with this repo, shallow or not).

Taytay
  • 11,063
  • 5
  • 43
  • 49