Problem at initialising a git repository using VS Code

8.7k views Asked by At

I have created one new file in an otherwise empty directory using VS Code. I went to version control and chose initialising this directory as a git repository. Now, a blue strip is moving around and a blue clock sign appeared on the git icon.

What does it wait for? With command line, git init is a no-brainer and lasts for a fraction of a second.

3

There are 3 answers

0
1nternetz On BEST ANSWER

If you click on the 3 dots up top, you can toggle Show Git Output. It will give you information on what commands VS Code is running in the background.

0
Juergen Schulze On

I had the same issue. Pressing "Initialize Repository" and nothing happens.

I think it's a problem with read/write rights of the project folder.

I am using Windows, but maybe it's also the same with Linux.

When creating a Laravel project with composer the issue occurs: hidden .git folder is created but nothing else happens.

When creating the project folder manually with file explorer and afterwards building the project with composer the issue is solved.

So my guess would be that composer messes up with folder creating somehow.

0
George Oyosa On

Had the same issue. Turned to be some Folder Permissions issues. Solved by changing the folder permissions to the currently logged in user (yourself) and restarting VS Code.

For a detailed explanation, I followed this guide: Initialize Repository Not Responding #148023