Soli
Soli

Reputation: 882

Gitkraken stuck at opening repo

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

Upvotes: 58

Views: 59868

Answers (30)

Weltgeist
Weltgeist

Reputation: 167

You may be having submodule related performance issue. Look at the below pic. On the left, I have 2 main gitkraken project tabs I have normally open and do a lot of dev work on. On the right. I have the same 2 gitkraken project tabs , but with 50 submodules.

The problem?

Sometimes I need to open a submodule in gitkraken make small changes, or to validate which commit is checked out. but that may be 1% if the time. But has soon as you open a submodule tab, even after you close the tab or gitkraken, it's saved in memory, and slow down your gitkraken. You use it 1% of the time, but it slows you down 100% of the time

The same also applies with previous git project repo you don't update anymore.

.Gitkraken no submodule and with submodule view The solution?

Delete the metadata of any submodule or past project you aren't actively using and open git kraken again. It should be much faster. They should be located here.

AppData\Roaming.gitkraken\logs
AppData\Roaming.gitkraken\profiles\****\repoSettings\

Upvotes: 0

Kerwin Sneijders
Kerwin Sneijders

Reputation: 814

Issues when using a symlink

I had this issue and it was caused by a sym link.

There was a symlink which I had removed (staged) and I then added a folder with the same name as the symlink that was removed. The moment I added files to this folder GitKraken wasn't able to open the repository anymore.

For me the solution was simple:

  1. Remove the symlink
  2. Push the removal of said symlinks
  3. Add the new folder with the same name as the removed symlink

Doing it in separate steps resolved the issue. I've also reported this to the GK team as a bug.

Upvotes: 0

Taytay
Taytay

Reputation: 11372

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).

Upvotes: 4

yoeunes
yoeunes

Reputation: 2945

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.

Upvotes: 44

Anya
Anya

Reputation: 1418

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. :)

Upvotes: 0

Ahmed Shahin
Ahmed Shahin

Reputation: 140

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

Upvotes: 0

BagoDev
BagoDev

Reputation: 333

*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.

Upvotes: 15

user2881850
user2881850

Reputation: 21

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 :)

Upvotes: 2

hellion
hellion

Reputation: 4850

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.

Upvotes: 1

mattseibl
mattseibl

Reputation: 41

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.

Upvotes: 0

Pype
Pype

Reputation: 75

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.

Upvotes: 0

ANDRE SMITH
ANDRE SMITH

Reputation: 31

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.

Upvotes: 3

Zolt&#225;n Erdős
Zolt&#225;n Erdős

Reputation: 11

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.

Upvotes: 0

BuvinJ
BuvinJ

Reputation: 11086

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!

Upvotes: 1

Nate Lai
Nate Lai

Reputation: 11

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.

Upvotes: 1

jethro_the_cat
jethro_the_cat

Reputation: 21

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.

Upvotes: 1

skapral
skapral

Reputation: 1217

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 [email protected]: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.

Upvotes: 1

Ger Mc
Ger Mc

Reputation: 640

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

Upvotes: 1

Douglas Anderson
Douglas Anderson

Reputation: 4720

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.

Upvotes: 4

Karl Wilbur
Karl Wilbur

Reputation: 6217

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.

Upvotes: 2

Borhan Kazimipour
Borhan Kazimipour

Reputation: 445

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.

Upvotes: 8

SimpleTrousers
SimpleTrousers

Reputation: 51

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.

Upvotes: 5

Pau Guillamon
Pau Guillamon

Reputation: 658

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.

Upvotes: 4

James Dizon
James Dizon

Reputation: 81

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

Upvotes: 6

Mr. Mysterion
Mr. Mysterion

Reputation: 21

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

Upvotes: 2

Ivica Škrobo
Ivica Škrobo

Reputation: 71

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

Upvotes: 7

rombow
rombow

Reputation: 209

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)

Upvotes: 3

Michael Thornberry
Michael Thornberry

Reputation: 31

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.

Upvotes: 3

matt antos
matt antos

Reputation: 21

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

Upvotes: 2

ChrisM
ChrisM

Reputation: 1168

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.

Upvotes: 25

Related Questions