Unable to create a long branch name through Windows terminal #23186

Closed
opened 2026-01-31 08:34:49 +00:00 by claunia · 6 comments
Owner

Originally created by @shloktech on GitHub (Apr 22, 2025).

Windows Terminal version

Using latest version

Windows build number

OS Name: Microsoft Windows 11 Enterprise and OS Version: 10.0.22631 N/A Build 22631

Other Software

Azure DevOps

Steps to reproduce

  1. In azure devops you can create a long branch through UI. Example:
    long_branch_foejfwifoajfjosdjfoasjoifjsdfijsdjfosdjiosdjfoasjfoiasjfoijsdfoisdjfoijsdofjoiwejofjoiwejfoiewiofjiowejfiojefjoijdofjosdijfoisdjfiosjdiofjsoidfjiosadjfosdiofjasiodfjiodjfiosdjfiodsj

Image

The branch is created:

Image

  1. Now open windows terminal and fetch this branch using git fetch origin long_branch_foejfwifoajfjosdjfoasjoifjsdfijsdjfosdjiosdjfoasjfoiasjfoijsdfoisdjfoijsdofjoiwejofjoiwejfoiewiofjiowejfiojefjoijdofjosdijfoisdjfiosjdiofjsoidfjiosadjfosdiofjasiodfjiodjfiosdjfiodsj

  2. You will get the below error saying filename too long highlighted in red. Hiding my repo name here:

Image

Above I have used windows power shell. The same is applicable for the command prompt as well:

Image

For your build you are using azure devops so it will be easy for you to reproduce: https://dev.azure.com/shine-oss/terminal/_build/latest?definitionId=1&branchName=main

Expected Behavior

If we are able to create long branch names in azure devops then we should be able to fetch them as well by using the terminal. If the long branch is not expected then we can tell Azure DevOps to put a limit on the branch creation size

Actual Behavior

We are unable to fetch the long branch from azure devops terminal
Windows PowerShell:
Image

Command prompt:
Image

Originally created by @shloktech on GitHub (Apr 22, 2025). ### Windows Terminal version Using latest version ### Windows build number OS Name: Microsoft Windows 11 Enterprise and OS Version: 10.0.22631 N/A Build 22631 ### Other Software Azure DevOps ### Steps to reproduce 1. In azure devops you can create a long branch through UI. Example: long_branch_foejfwifoajfjosdjfoasjoifjsdfijsdjfosdjiosdjfoasjfoiasjfoijsdfoisdjfoijsdofjoiwejofjoiwejfoiewiofjiowejfiojefjoijdofjosdijfoisdjfiosjdiofjsoidfjiosadjfosdiofjasiodfjiodjfiosdjfiodsj ![Image](https://github.com/user-attachments/assets/3018fd4a-66a1-49d9-87f0-160216e3172f) The branch is created: ![Image](https://github.com/user-attachments/assets/35635813-e456-45a4-8702-45b7592667a8) 2. Now open windows terminal and fetch this branch using `git fetch origin long_branch_foejfwifoajfjosdjfoasjoifjsdfijsdjfosdjiosdjfoasjfoiasjfoijsdfoisdjfoijsdofjoiwejofjoiwejfoiewiofjiowejfiojefjoijdofjosdijfoisdjfiosjdiofjsoidfjiosadjfosdiofjasiodfjiodjfiosdjfiodsj` 3. You will get the below error saying filename too long highlighted in red. Hiding my repo name here: ![Image](https://github.com/user-attachments/assets/17da7c3b-a31b-4ae2-96e6-6863e6b0bfab) Above I have used windows power shell. The same is applicable for the command prompt as well: ![Image](https://github.com/user-attachments/assets/addcd83e-dd7b-4575-a8de-acda4f134dc6) For your build you are using azure devops so it will be easy for you to reproduce: https://dev.azure.com/shine-oss/terminal/_build/latest?definitionId=1&branchName=main ### Expected Behavior If we are able to create long branch names in azure devops then we should be able to fetch them as well by using the terminal. If the long branch is not expected then we can tell Azure DevOps to put a limit on the branch creation size ### Actual Behavior We are unable to fetch the long branch from azure devops terminal Windows PowerShell: ![Image](https://github.com/user-attachments/assets/17da7c3b-a31b-4ae2-96e6-6863e6b0bfab) Command prompt: ![Image](https://github.com/user-attachments/assets/addcd83e-dd7b-4575-a8de-acda4f134dc6)
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Attention labels 2026-01-31 08:34:49 +00:00
Author
Owner

@shloktech commented on GitHub (Apr 22, 2025):

Tagging top contributors for this issue. Can you please take a look into this one?
@DHowett , @zadjii-msft , @lhecker , @carlos-zamora , @miniksa , @j4james , @PankajBhojwani , @Don-Vito

@shloktech commented on GitHub (Apr 22, 2025): Tagging top contributors for this issue. Can you please take a look into this one? @DHowett , @zadjii-msft , @lhecker , @carlos-zamora , @miniksa , @j4james , @PankajBhojwani , @Don-Vito
Author
Owner

@zadjii-msft commented on GitHub (Apr 22, 2025):

This is not a Terminal issue. I'm guessing this would repro with the same git client, on any terminal emulator on Windows.

Sounds like a git for Windows issue. More accurately, it sounds like an issue with not having long path support enabled. What version of git are you using/?

@zadjii-msft commented on GitHub (Apr 22, 2025): This is not a Terminal issue. I'm guessing this would repro with the same `git` client, on any terminal emulator on Windows. Sounds like a git for Windows issue. More accurately, it sounds like an issue with not having long path support enabled. What version of `git` are you using/?
Author
Owner

@shloktech commented on GitHub (Apr 22, 2025):

Hello @zadjii-msft ,
Yes correct I tried the same operation on git bash and it was reproduced. I am using below version of git: on windows 2.45.2.windows.1

Let me know further action items that I need to take.

@shloktech commented on GitHub (Apr 22, 2025): Hello @zadjii-msft , Yes correct I tried the same operation on git bash and it was reproduced. I am using below version of git: on windows 2.45.2.windows.1 Let me know further action items that I need to take.
Author
Owner

@shloktech commented on GitHub (Apr 23, 2025):

Hello @zadjii-msft ,
Any updates on the above?

@shloktech commented on GitHub (Apr 23, 2025): Hello @zadjii-msft , Any updates on the above?
Author
Owner

@zadjii-msft commented on GitHub (Apr 23, 2025):

Did you try googling for "git bash long path windows"?

https://stackoverflow.com/a/22575737

@zadjii-msft commented on GitHub (Apr 23, 2025): Did you try googling for "git bash long path windows"? https://stackoverflow.com/a/22575737
Author
Owner

@shloktech commented on GitHub (Apr 23, 2025):

Hello @zadjii-msft ,
Thank you for the comment. On analysis I see it is more specific to Azure DevOps portal. Here I am able to create a long branch name in Azure DevOps portal but when I try to fetch that branch on my machine using windows terminal I get the above mentioned issue and same can be reproduced with other terminals like git bash and more. Github has a character limit x letter on branch name but it is not applied on Azure DevOps portal making it a bad practice.

Will take it up ahead with Azure DevOps folks by raising a Microsoft support ticket. Let me know if you know any person of contact
or git repo who can look into it.

Thank you and best regards,
Shlok
LinkedIn

cc: @DHowett , @lhecker @carlos-zamora

@shloktech commented on GitHub (Apr 23, 2025): Hello @zadjii-msft , Thank you for the comment. On analysis I see it is more specific to Azure DevOps portal. Here I am able to create a long branch name in Azure DevOps portal but when I try to fetch that branch on my machine using windows terminal I get the above mentioned issue and same can be reproduced with other terminals like git bash and more. Github has a character limit x letter on branch name but it is not applied on Azure DevOps portal making it a bad practice. Will take it up ahead with Azure DevOps folks by raising a Microsoft support ticket. Let me know if you know any person of contact or git repo who can look into it. Thank you and best regards, Shlok [LinkedIn](https://www.linkedin.com/in/shlok-t/) cc: @DHowett , @lhecker @carlos-zamora
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23186