Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change title of Git terminal in Windows?

Tags:

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?

like image 949
Isidro Serrano Pineda Avatar asked Sep 27 '17 23:09

Isidro Serrano Pineda


People also ask

How do I change the terminal name in Windows?

You can right click on a tab and select Rename Tab to rename a tab for that terminal session. Clicking this option in the context menu will change your tab title into a text field, where you can then edit the title.

Can you customize git Bash?

By default, the Git Bash Shell displays computer name and username properties in the prompt window. Understandably, some users prefer to change these Git Bash Shell settings. Fortunately, it's not that difficult to do. Edit the git-prompt.sh file to customize the Git Bash Shell prompt's config settings.

Can I use git Bash as terminal in Windows?

Git Bash can be installed as other Windows applications, but you need to first download the executable file from the Git Bash download page and then follow the installation steps.


1 Answers

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.

like image 97
user3086265 Avatar answered Oct 02 '22 23:10

user3086265