Simple pushtogit script

Create new file and add the next lines inside (for example pushtogit.sh)

 
#!/bin/bash
echo " ====================== running command from" $PWD
cd $PWD
git add .
echo -n " ====================== commit message: "
read message
git commit -m "$message"
git push -u origin master
echo " ====================== done..."

Save the changes and add the alias inside .bashrc

alias pushtogit="/home/USER/PATH/pushtogit.sh"

Leave a Reply

Your email address will not be published. Required fields are marked *