0

I have a question related to the __git_ps1() function existing in the mingw64 terminal for git for windows application. I would like to have a part of the branch names to be shown. For example, suppose you work with Jira and your branches are created for each story/bug and you name them like STORY-<STORY_NUMBER>_<some_more_stuff>. I wanted to cut out the rest after and including the _ symbol, but have no clue how to do that. I found the function in the git-prompt.sh file. I find the function is too long for copying. BTW, it can be found eighter here /etc/profile.d/git-prompt.sh or here /mingw64/share/git/completion/git-prompt.sh relative to the git installation folder.

Edit - Adding the git-prompt.sh link

In case you don't have the file, you can find it here

arsdever
  • 1,111
  • 1
  • 11
  • 32

0 Answers0