Push your Full ZSH History to your git #Ubuntu #Git #Shell
# Create a backup for your command line history
cd /home/unkown/command-line-history
git checkout history
# Make sure we find the latest file
LASTCREATEDFILE="$(date +'%Y-%m-%d')"
echo "" >> ${LASTCREATEDFILE}.txt
echo \ >> ${LASTCREATEDFILE}.txt
# Append the whole history to the file
\history -i 1 >> ~/command-line-history/${LASTCREATEDFILE}.txt
git add .
git status
git commit -m "Command line for today saved"
git push origin history --force
google-chrome https://gitlab.com/georgios_zachariadis/command-line-history/tree/history