Finally replaced old crappy git prompt with the vanilla one from the contrib and did some tuning to the Bash history
# git
if [[ -f ~/.git-completion.bash ]]; then
. ~/.git-completion.bash
fi
if [[ -f ~/git-prompt.sh ]]; then
. ~/git-prompt.sh
fi
PS1='[\u@\h \W$(__git_ps1 " (\[\033[1;34m\]%s\[\033[0m\])")]\$ '
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUPSTREAM="auto"
# History (see https://sanctum.geek.nz/arabesque/better-bash-history/)
HISTFILE="${HOME}/.bash_history.$(hostnamectl --static)"
shopt -s histappend
HISTFILESIZE=1000000
HISTSIZE=1000000
HISTCONTROL=ignoreboth
HISTIGNORE='ls:bg:fg:history'
HISTTIMEFORMAT='%F %T '
shopt -s cmdhist
PROMPT_COMMAND='history -a'