Git commit bash script

后端 未结 6 2165
刺人心
刺人心 2020-12-25 10:53

I\'m writing a bash script to add, commit, push all files in a directory.

#!/bin/bash  
git add .  
read -p \"Commit description: \" desc  
git commit -m $de         


        
6条回答
  •  孤独总比滥情好
    2020-12-25 11:14

    #!/bin/bash  
    git pull
    git add .
    git commit -m "$*"
    git push
    

    call script with comment as cmd args, less keys to push:

    $ ./togithub test commit script 
    

提交回复
热议问题