Is there any way to remove the username and computer name from Git Bash for Window 10?
I already checked this : https://github.com/Maximus5/ConEmu/issues/199
But didn't understand how to do that.
C:\Program Files\Git\etc\profile.d\
foldergit-prompt.sh
file in your favorite text editorPS1="$PS1"''
NOTE: You can also hide the annoying MINGW64 text by commenting out the line number 16 and 17 of the same file. To comment out those lines just add a # to the beginning of the line. That's it. Now start/restart Git Bash and it should go away.
Follow the steps as mentioned by @Saabbir, with one big change:
# 👇 comment out the wrapping if-else block
if test -f ~/.config/git/git-prompt.sh
then
. ~/.config/git/git-prompt.sh
else
# 👇 leave the content uncommented
...
fi
Save the file, git-prompt.sh
using Save As (in your editor) in this path C:\Users\{current_windows_user}\.config\git
Explanation: You can see on line number 8 that it checks for the same file on ~/.config/git
. So it's better to update the config file rather than the actual settings file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With