Solved GitKraken “Could not find a compatible repository”

When you are using GitKraken to manage Source Control (Push and Pull code from remote Repository) and this error happens: 

Could not find a compatible repository (Mainly GitKraken enters in a loop of trying to fix itself but the problem persists). 

Explainer: When the window pops out saying that it could not find a compatible repository (local repository), chances are that you stashed your work on the other branch and then closed GitKraken which means, GitKraken might have lost the state of the repository. Other users have said to have solved this problem by hard reset Git with Powershell, however, this is how I resolved this issue without hard resetting the Source Tree.

Solution:
  1. Get access to git in the local repository that you are working in, this can be done through Visual Studio code or any other Git Client you are currently using to manage your programming.
  2. Then, commit the work that you have done/performed on your current branch. Try to Checkout to the branch you previously stashed the work and then Pop the Stash on that branch (this puts the source tree to the state where GitKraken remembers). If possible commit the changes on that branch you have just Popped the Stashed
  3. After the previous steps have been performed, just to be sure and safe. Close all the applications that are using the local repository e.g. If you are developing in Rails, it is possible that you are running Rails Server to consume the same repository you are developing on. This free's up the memory as well.
  4. After, step 3 is performed start the GitKraken and there you go. The application should now load and continual functioning.
  5. If after following steps 1 to 4 does not fix the problem, do not initialize Git in the repository instead just click on "Open Repository" and then navigate to the Local Repository. GitKraken should be in synch with the existing Source Tree. Let me know if this helped you and give it a like. Thank you.