Is it possible to show git branch and repo details when in a git directory for cmd. #5947

Closed
opened 2026-01-31 00:26:12 +00:00 by claunia · 4 comments
Owner

Originally created by @clintverghese on GitHub (Jan 15, 2020).

I was wondering how it is possible to display git repo and branch information as shown in the illustration below.
image
source

Description of the new feature/enhancement

The illustration above shows git repo and branch details in a powershell window. Is the same possible in cmd? If yes, how? Else it would be a great feature to have.

Originally created by @clintverghese on GitHub (Jan 15, 2020). I was wondering how it is possible to display git repo and branch information as shown in the illustration below. ![image](https://user-images.githubusercontent.com/28553763/72433969-869e6f00-37c0-11ea-8226-8ffe2fc33ca0.png) [source](https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-8-release/) # Description of the new feature/enhancement The illustration above shows git repo and branch details in a powershell window. Is the same possible in cmd? If yes, how? Else it would be a great feature to have.
claunia added the Issue-FeatureNeeds-TriageNeeds-Tag-Fix labels 2026-01-31 00:26:12 +00:00
Author
Owner

@electronic-dk commented on GitHub (Jan 15, 2020):

There's a powershell module called posh-git which serves the same purpose: https://github.com/dahlbyk/posh-git
Not sure how to achieve this in cmd though.

@electronic-dk commented on GitHub (Jan 15, 2020): There's a powershell module called posh-git which serves the same purpose: https://github.com/dahlbyk/posh-git Not sure how to achieve this in cmd though.
Author
Owner

@DHowett-MSFT commented on GitHub (Jan 15, 2020):

Unfortunately, there is not. We don’t have any plans to change CMD significantly.

@DHowett-MSFT commented on GitHub (Jan 15, 2020): Unfortunately, there is not. We don’t have any plans to change CMD significantly.
Author
Owner

@AlphaGeek commented on GitHub (Jul 5, 2021):

This is the ONLY reason I never use MS Terminal....has to show the git branch else it is useless to me. Every other git bash shell does this so why would I use this one?

@AlphaGeek commented on GitHub (Jul 5, 2021): This is the ONLY reason I never use MS Terminal....has to show the git branch else it is useless to me. Every other git bash shell does this so why would I use this one?
Author
Owner

@orcmid commented on GitHub (Jul 5, 2021):

This is the ONLY reason I never use MS Terminal....has to show the git branch else it is useless to me. Every other git bash shell does this so why would I use this one?

I notice there is a tendency to confused Terminal with the shell that happens to be tied to a Terminal pane. Is that happening here?

I have not attempted to run it bound to a Terminal pane, but the Git Bash that is installed along with the GitHub Desktop app on Windows seems to do what you want.

GitBash-2021-07-05-0957-Git Integration

I notice that the GitCMD does not seem to do such a thing, unless there is something in the prompt string that achieves it. I did not look into that.

GitCMD-2021-07-05-1004-GitUnaware

@orcmid commented on GitHub (Jul 5, 2021): > This is the ONLY reason I never use MS Terminal....has to show the git branch else it is useless to me. Every other git bash shell does this so why would I use this one? I notice there is a tendency to confused Terminal with the shell that happens to be tied to a Terminal pane. Is that happening here? I have not attempted to run it bound to a Terminal pane, but the Git Bash that is installed along with the GitHub Desktop app on Windows seems to do what you want. ![GitBash-2021-07-05-0957-Git Integration](https://user-images.githubusercontent.com/3372580/124502711-cff9ca00-dd78-11eb-8349-5bfd996a4616.png) I notice that the GitCMD does not seem to do such a thing, unless there is something in the prompt string that achieves it. I did not look into that. ![GitCMD-2021-07-05-1004-GitUnaware](https://user-images.githubusercontent.com/3372580/124502793-fddf0e80-dd78-11eb-8e24-530f6736a831.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5947