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.
 
 
 
IYUUAutoReseed/vendor/owner888/phpspider/gitadd.sh

20 lines
363 B

#!/bin/bash
if [ ! -d "$1" ] && [ ! -f "$1" ]; then
echo "file $1 not exists"
exit
fi
filename=$1
comment="add file"
if [[ $2 != "" ]]; then
comment=$2
fi
echo "start update..."
git pull
echo "start add new file..."
git add $filename
echo "start commit..."
git commit -m "$comment" $filename
git push -u origin master
echo "git commit complete..."