Create a new gitbash.sh file in the root directory of the project:

#! / bin/bash git stash save 'backup' # for current branch name function. Git branch {br = ` git branch | grep "*" ` echo ${br / * /}} branch=`git.branch` git reset --hard origin/$branch git pull git stash pop git add . git commit -m $1 --no-verify git pull git push origin $branch:refs/for/$branch

Sh./gitbash. Sh ‘Submit description information’

Additional Notes:

1, the #! /bin/bash, which states how the script is interpreted, must be written on the first line; 2, Run error report, can not find sh command how to solve? Make sure you have the Git tool installed correctly. In the bin folder in your Git installation directory, find sh.exe. Add the corresponding environment to your system variables, such as C:\Program Files\Git\bin 3. The $1 value is the first argument to the sh. /gitbash. Sh ‘submit description information’ command