Can’t write shell, please help me,
I can only execute a few git commands
cd /home/xx
git add .
git commit -m '时间,如2016-03-03 12:0:03'
git push origin master
Resolved
cd /hmoe/xx
backtime=`date +%Y%m%d%H%M%S`
git add .
git commit -m bk_${backtime}
git push origin master
You also need to create a remote library,
git remote add origin "xx"
The double quotes are the .git file of the remote git, such as
https://github.com/yourname/yourproject.git
I wrote a similar script in php.