How to change title of Git terminal in Windows?

Isidro Serrano Pineda picture Isidro Serrano Pineda · Sep 28, 2017 · Viewed 10.6k times · Source

I work in Windows 10 and usually I have up to 5 CMD windows open. I work this way because I need to run the same application with different data and keep monitoring if any exception is thrown.

I set a number as the window's title (using the title command) instead of the default text, in order to easily identify which window I'm working in and be able to identify and change between them using Alt+Tab (an example of how I work with my CMD windows)

Recently I started to use Git and I really like the Git Bash terminal for Windows. I would like to work with Git Bash terminal the same way I work with CMD windows, but I can't find any way to change the window title. I searched a bit and found these instructions and some others (that I can't paste because I'm not allowed to post more than two links yet), but it seems to work only by setting a different default title. I'd like to change the window title to any custom text I choose, at any moment.

Is this possible? Is there a command like title available for Git Bash?

Answer

user3086265 picture user3086265 · Feb 12, 2018

This thread is a few months old. But I think an alternative will be helpful

You can add following line to .bashrc file in your user profile folder

export TITLEPREFIX="Git Bash"

where you want Git bash to be your title prefix. This is user specific change. So if a machine is used by multiple users with their own logins, everyone can customize their own title.