You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

While collaboration, you may need to pull, commit, and push in CLI. Followings are bash scripts I use in my system.

git_commit.sh

#!/bin/bash
echo Please input your commit message below \(blank to put as "bug fix"\)
read commit
sudo -u apache git pull
sudo -u apache git add .
if [ ! "$commit" ]; then
        sudo -u apache git commit -m "bug fix"
else
        sudo -u apache git commit -m "$commit"
fi
sudo -u apache git push
sudo -u apache git pull


  • No labels