In our daily development process, good development habits can make us more efficient, every time we finish the iteration, fix some problems, etc., we will eventually submit the code. When submitting code, it is very convenient to use tools to submit code

My personal habit is to use the command line and use tools when looking at commit records, so I always type “git add. “…. every time I commit code Over and over again…

In order to improve efficiency, I wrote scripts to help me quickly submit with my limited knowledge

Create the sh file called vscommit.sh on the first page

if [ ! -n "$1" ] ;then
    echo "you have not input a comment!"
    exit 0
else
    echo "$1"
    echo "Confirm branch information..."
fi
git status
echo  "Click enter to continue Commit and push? "
read answer
git pull
git add .
git commit -m $1
git pull
git push

Copy the code

Then when my finished code needs to be submitted, I just run the file on the terminal and the command will be automatically executed

If no information is submitted or there is an error, it will be prompted

Just press Enter to complete the submission

Hh creates the build.sh file to verify that the merge is complete and the code runs on the terminal as before

git pull
npm run build
Copy the code

This is successful pull, details can determine success or failure, simple instructions can help me reduce some time, so I can solve other bugs [dog head] small function insignificant hope to help daily implementation of command partners to improve efficiency ~