I have not asked a question of this nature before, so this may not be the correct site for this.
I use the xfce terminal in drop-down mode connected to a hotkey. It clos
unset DISPLAY when running git commands that might need password, and gnome-ssh-askpass will use a text terminal prompt.
For example:
DISPLAY= git push