trimming of git branch and function for updating gitrepos