If by date you mean the current time/date, then this example can help:
PS1="\n\[\033[35m\]\$(/bin/date)\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\]"
It uses $(/bin/date)
and is a multi-line prompt containing date/time, full path, user and host, active terminal, even file count and space usage.
It illustrates how you could integrate the date in your own git prompt.
The OP deblendewim comments:
I was also wondering how to change it without running it immediatly in the prompt.
Changed profile-file from:
if test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
into
if test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
if test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
intoif test -z "$WINELOADERNOEXEC" then PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\] $ ' else PS1='\[\033]0;$MSYSTEM:\w\007 \[\033[36m\]\t \[\033[32m\]\u@\h \[\033[33m\w\033[0m\] $ '
– Rahel