I made my own .bashrc (part of code below) and in test by pressed arrows up/down: i found that history of commands override static text of line or leaves last command and print new over it. How to fix that?
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
RESTORE=$(echo -en '\033[0m')
RKNAME=$(echo -en '\033[38;5;106m')
RKPATH=$(echo -en '\033[38;5;229m')
RKBRANCH=$(echo -en '\033[38;5;44m')
RKGIT=$(echo -en '\033[38;5;250m')
pathToFolder=$PWD;
if [[ $pathToFolder =~ .*_GitRepo.* ]]
then
PS1='${RKNAME}\u@\h${RESTORE} ${RKGIT}Git ${RKPATH}\W\ ${RKBRANCH}$(parse_git_branch) \n ${RKGIT}-- $ ${RESTORE} '
fi