gitpushworkflow
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

60 lines
802 B

#!/bin/bash
# author: hellodk
# time: 2021-07-04 13:47:27
# script feature description: `git add .` and `git commit -m` and `git push` workflow
function gitpushflow(){
time3=$(date "+%Y-%m-%d %H:%M:%S")
CRTDIR=$(pwd)
cd $CRTDIR
echo
echo "this a git push workflow in macOS or Linux, using a shell file"
echo
echo "current time is: $time3"
echo
echo "current work dir is: "$CRTDIR
echo
gittt="/usr/bin/git"
echo "first step: git add ."
$gittt add .
sleep 2
message="$time3 update"
echo
echo "second step: git commit -m 'xxxx'"
$gittt commit -m "$message"
sleep 2
$gittt push
echo
echo "third step: git push. ending."
echo
echo "the end of the workflow."
}
gitpushflow