vscode-copy-github-url icon indicating copy to clipboard operation
vscode-copy-github-url copied to clipboard

.git/HEAD does not exist

Open Subtixx opened this issue 4 years ago • 6 comments

It exists though.

Subtixx avatar Sep 13 '21 17:09 Subtixx

Can you provide a bit more info about how you're seeing this?

For example: which repository, command entered, screenshot of error, location of HEAD relative to current working director.

There could be a problem with how we're using one of these npm git libraries: https://github.com/differentmatt/vscode-copy-github-url/blob/5506dafd3298259b5071aa6ccea7e0bccdfbf2c5/src/main.js#L3-L7

Thanks!

differentmatt avatar Sep 15 '21 17:09 differentmatt

I wasn't able to reproduce this problem. If you're seeing this problem, please reopen the issue. Thanks!

differentmatt avatar Oct 15 '21 22:10 differentmatt

@differentmatt I'm having the same issue. It works before and suddenly it displays the error message:

(Copy GitHub URL) Error: .git/HEAD does not exist

And I do have HEAD:

f6c16ee9 (HEAD -> main, origin/main) Fix RTCStatsReport of video kind being accidentally filtered (#2181)
ffecd31d Fix bandwidth selection in demo preview (#2168)
eff5c2c7 Update README Video -- perform startLocalVideoTile after audioVideoDidStart… (#2167)
bec0e133 Move subscribe to MediaStreamBrokerObserver to end of connection (#2163)
3f5aaa75 No longer stop video stream when calling stopLocalVideoTile (#2162)
a2f2613c Update getMediaType() to check the property kind instead of mediaType (#2160)
a17e8d11 Reuse media capture s3 buckets for release demo (#2156)
799fe946 Version bump for [email protected] (#2159)
6402938f Update README to point to v3 migration and fix FAQ for POSTLogger (#2158)

I could not provide a stable way to reproduce it, but I assume that it happened after I used any of below commands:

git reset --hard origin/main
git reset --hard
git pull --hard origin main
git reset HEAD@{1}

The GitHub repo I'm working on: https://github.com/aws/amazon-chime-sdk-component-library-react

xuesichao avatar Apr 25 '22 21:04 xuesichao

@differentmatt I'm having the same issue. It works before and suddenly it displays the error message:

(Copy GitHub URL) Error: .git/HEAD does not exist

And I do have HEAD:

f6c16ee9 (HEAD -> main, origin/main) Fix RTCStatsReport of video kind being accidentally filtered (#2181)
ffecd31d Fix bandwidth selection in demo preview (#2168)
eff5c2c7 Update README Video -- perform startLocalVideoTile after audioVideoDidStart… (#2167)
bec0e133 Move subscribe to MediaStreamBrokerObserver to end of connection (#2163)
3f5aaa75 No longer stop video stream when calling stopLocalVideoTile (#2162)
a2f2613c Update getMediaType() to check the property kind instead of mediaType (#2160)
a17e8d11 Reuse media capture s3 buckets for release demo (#2156)
799fe946 Version bump for [email protected] (#2159)
6402938f Update README to point to v3 migration and fix FAQ for POSTLogger (#2158)

I could not provide a stable way to reproduce it, but I assume that it happened after I used any of below commands:

git reset --hard origin/main
git reset --hard
git pull --hard origin main
git reset HEAD@{1}

Ok, thanks for the info. I'll see if I can reproduce the issue and follow-up.

differentmatt avatar Apr 25 '22 21:04 differentmatt

Hey, I also get this error. I believe the problem, for me at least, is I am using a multi-root workspace. This extension is using workspaceFile to find the .git folder, which is the location of the first folder in the workspace. This folder doesn't contain .git so the error occurs.

It would be great to either follow up on #14 or change the "Root git folder" option to be an absolute path, rather than a relative one. Thanks

robcrocombe avatar Aug 18 '22 15:08 robcrocombe

I am getting the same error and am also using a multi-root workspace.

papr avatar Oct 11 '22 16:10 papr