Could not detach head

Helen Xu October 19, 2023

I have this error when I tried to commit a change on SourceTree and tried to pull or push the change: is there anyone can help me? error.jpg

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 20, 2023

Hi Helen,

This is the error from the output that indicates the cause of this issue:

Filename too long

This comes from a limitation in Windows as it does not properly support files and directories longer than 260 characters.

In order to solve this, you can change the Git configuration by executing the following command in a terminal/Git Bash:

git config --system core.longpaths true

This will apply to all users on the Windows machine and it will allow file paths of 4096 characters.

You can also configure it for your Windows user only with the command

git config --global core.longpaths true

You can find more info on the following knowledge base article. This article is from Bamboo knoweldge base, but it applies in cases where Bamboo is not used.

Please feel free to reach out if you have any questions!

Kind regards,
Theodora

Helen Xu October 20, 2023

It really helps! Thanks a million!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 23, 2023

That's good to hear and you are very welcome!

Please feel free to reach out if you ever need anything else!

Like Helen Xu likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events