First, setup a git alias:
% git config --global alias.project-name 'config --replace-all project.info.name'Use it like this (your CWD should be a git project):
% git project-name "NodeJS Latest"Review the setting with:
% git config --local --get project.info.nameIn your bash profile:
export PROMPT_COMMAND="echo -ne \"\033]0;\$(git config --get project.info.name || $PROMPT_COMMAND)\007\"; $PROMPT_COMMAND"Your terminal tab when you are within a configured project:
Your terminal tab when you are not in a configured project:


Caveats
git(1)is a requirement; however, this is simple to extend for other VCSes.Inspiration
Alternative Approaches