I'm trying to push code using git to my remote server, but I get the error:
fatal: protocol error: bad line length character:
8
I researched this bug and it turns out my .bashrc
file that echos out a welcome screen is causing this error. What I would like to do is determine if this is a git push and to NOT display the welcome screen, or only display the screen when logging into SSH with no directory parameter:
ssh user@ssh-server.foo:/deployment/bare-git-repo
Here is the relevant lines in .bashrc
:
if [ -e ./.doc ]
then
cat ./.doc
pm2 list
fi
Thanks in advance!